{
    "openapi": "3.1.0",
    "info": {
        "title": "Nuacom API Reference",
        "version": "0.3794.1",
        "description": "V2 is the current, stable NUACOM API and the one to build new integrations against. It covers the whole product: account and users, extensions, numbers and call routing, IVR, call logs and recordings, SMS, contacts, billing and more.\n\n- Base URL: `https://api.api-nuacom.com/v2`\n- Reference: [/v2/ref](/v2/ref), generated from the deployed code, so it always matches what is running. Use the search box (Ctrl+K / \u2318K) to jump to an endpoint.\n- Authentication: the `Authorization: Bearer` header, see the [Authentication guide](/v2/docs/authentication).\n\n## Stability\n\n- Existing endpoints, parameters and response fields are not removed or renamed within V2. New optional fields and endpoints can appear at any time: read responses by key and ignore keys you do not know.\n- Dates are returned as `Y-m-d H:i:s` by default; accounts can opt into ISO 8601 output. Send `X-Timezone` with an IANA timezone name on endpoints that take date filters, otherwise the user's profile timezone is used.\n- Rate limit: 3000 requests per minute per token; above that the API answers `429` with a `Retry-After` header.\n\n## Endpoints under `/v3/\u2026`\n\nSome resources are served from a `/v3/\u2026` path. These are not a separate API: the same token works on both, one integration mixes `/v2/\u2026` and `/v3/\u2026` calls freely, and every one of them is listed in this reference alongside the `/v2/\u2026` endpoints. Copy the path from the reference as it is shown there.\n\nA handful of resources \u2014 contacts, call tags, call notes, users, queues and number blocking \u2014 have an endpoint on both paths. They are not duplicates: each operation in the reference says what it does and, where a close counterpart exists on the other path, how the two differ. The stability rules above apply to the `/v3/\u2026` endpoints too, except that validation rules there are stricter and may be tightened further between releases."
    },
    "servers": [
        {
            "url": "https://api.api-nuacom.com",
            "description": "production"
        }
    ],
    "tags": [
        {
            "name": "Auth",
            "description": "The Auth group holds the login endpoints and the password endpoints that go with them. Every token they issue is sent as `Authorization: Bearer <token>`, described in the [Authentication guide](/v2/docs/authentication).\n\n## Which token to use\n\n**Preferred: an API key.** An account admin issues it on the portal's **Settings \u2192 API Keys** page. The key acts as the admin who created it, so it reaches everything an account admin can, never expires, and needs none of the endpoints below. Use it for integrations, scripts and servers.\n\n**When you need a token scoped to one specific user** (with that user's narrower permissions and call-log visibility rather than an admin's), log in as that user with [`POST /v2/auth/login`](/v2/ref#/operations/auth.loginV1): it takes `email`, the plain-text password in `pass` (the API hashes it), `remember` and `two_fa_code`, and answers with a session token. A session token expires (30 days, or 90 with `remember`), so a long-running integration that does not need per-user restrictions should still prefer an API key.\n\n## Workflow\n\n```mermaid\nflowchart TD\n    login[\"POST /v2/auth/login<br/>email, pass, remember\"] --> answer{Answer}\n    answer -- \"200, two_fa_enabled: true\" --> code[\"Ask the user for the emailed code\"]\n    code --> retry[\"POST /v2/auth/login<br/>+ two_fa_code\"] --> answer\n    answer -- \"401, code: 4001\" --> password[\"POST /v2/auth/update-password\"] --> login\n    answer -- \"200, session_token\" --> calls[\"Authorization: Bearer on every call<br/>for expire_in seconds\"]\n    calls --> logout[\"POST /v2/logout\"]\n    calls -- \"401 from any endpoint\" --> login\n```\n\n1. [`POST /v2/auth/login`](/v2/ref#/operations/auth.loginV1) with `email`, the password in `pass` and `remember`.\n2. If the answer is `200` with `two_fa_enabled: true`, a code has been emailed to the user: ask for it and repeat the same call with `two_fa_code`.\n3. If the answer is `401` with `code: 4001`, the password has expired: collect a new one, call [`POST /v2/auth/update-password`](/v2/ref#/operations/auth.update-password) with the plain-text `password`, `new_password` and `new_password_confirmation`, then log in again with the `two_fa_code` that call returns.\n4. Store `session_token` and send it as `Authorization: Bearer <session_token>`. Store `expire_in` too: the session is fixed-length (30 days, or 90 with `remember`) and is not extended by use.\n5. Call [`POST /v2/logout`](/v2/ref#/operations/auth.logout) when you are done. A `401` from any endpoint means the session is gone: log in again.\n\n## Roles and access\n\n- No token is needed for the login and password endpoints; `update-password` identifies the user by `email`.\n- No account-admin requirement.\n- An account can enforce 2FA for every user, restrict logins to an IP allow-list (`code: 4004`) or disable password logins in favour of single sign-on (`code: 4002`).\n\n## Pitfalls\n\n- Send these calls to the central host `https://api.api-nuacom.com`. On an account subdomain they answer `404`.\n- `login` and `update-password` take the password in plain text; send them over HTTPS only.\n- \"2FA needed\" is HTTP `200`, not an error. Only a wrong or expired code is a `401`.\n- Five failed logins from one IP address within five minutes lock that address for a few minutes.\n- `update-password` expires every existing session of the user, on every device."
        },
        {
            "name": "Account",
            "description": "The account is the organization your token belongs to: its id (`IE-00123`), company and billing details, primary user, timezone and balances. [`GET /v2/account_info`](/v2/ref#/operations/account.view) is the one endpoint of this group and the first call to make with a new API key (see [Quickstart](/v2/docs/quickstart)). Beside it sit three sub-groups of account-wide settings that an account admin manages in the portal's account settings: **Account / Settings** (the password policy and the read-only security settings), **Account / Language Config** (the languages AI transcription uses) and **Account / AI Config** (the call recap email).\n\n## Account info and its sub-configs\n\n```mermaid\nflowchart TD\n    info[\"GET /v2/account_info\"] --> security[\"Account / Settings<br/>GET /v2/account-security-settings\"]\n    info --> language[\"Account / Language Config<br/>GET/POST /v2/account-language-config\"]\n    info --> ai[\"Account / AI Config<br/>GET/POST /v2/account-ai-config\"]\n```\n\n## Workflow (what the portal does)\n\n1. **Account info**: [`GET /v2/account_info`](/v2/ref#/operations/account.view), any user. The fields are described below.\n2. **Password policy**: [`GET /v2/account-password-requirements`](/v2/ref#/operations/v2.getPasswordRequirements), any user, returns the rules a new password must meet, keyed by rule, each with a `value` and a ready-to-show `text`. `password_min_length` (the minimum length, `8` by default) and `no_reuse` are always present; `password_must_mixed_case`, `password_must_include_numbers`, `password_must_include_symbols` and `password_is_uncompromised` appear only when enabled, with `value: true`. The change-password form validates against it before calling [`POST /v2/auth/update-password`](/v2/ref#/operations/auth.update-password), and the same object comes back as `requirements` when a login fails with code `4001` (see [Authentication](/v2/docs/authentication)).\n3. **Security settings** (account admin): [`GET /v2/account-security-settings`](/v2/ref#/operations/account-security-settings.index) returns the settings in the table below plus `oauth` and `ip_whitelist`. They are read-only here: changing them, 2FA and the IP allow-list included, is done in the portal's account settings.\n4. **Transcription languages**: [`GET /v2/language-options`](/v2/ref#/operations/v2.languageOptions), any user, lists the 58 supported languages as `{\"data\": [{\"code\": \"en\", \"label\": \"English\"}, \u2026]}` with two-letter codes. [`GET /v2/account-language-config`](/v2/ref#/operations/account-language-config.index) returns the account's defaults and overrides and [`POST /v2/account-language-config`](/v2/ref#/operations/account-language-config.store) replaces them (account admin, where the feature is enabled). Details below.\n5. **AI call recap** (account admin): [`GET /v2/account-ai-config`](/v2/ref#/operations/account-ai-config.index) and [`POST /v2/account-ai-config`](/v2/ref#/operations/account-ai-config.store), described below.\n\n## Reading the account info\n\n| Field | Meaning |\n|---|---|\n| `account_id` | The account id (`IE-00123`), the same value `POST /v2/auth/login` returns |\n| `company_name`, `company_email`, `billing_email` | As set in the portal; `null` when unset |\n| `address` | `address_1`, `address_2`, `city`, `county`, `country_iso_code`, `post_code`, `coordinates`; every key is present, `\"\"` when unset |\n| `account_holder` | The primary user: `user_id`, `user_email`, `user_name`, `last_login` (`null` if they never signed in); `null` when the account has no primary user |\n| `account_country_code` | ISO 3166-1 alpha-2 country of the account: the address country, or the account's own country when the address has none |\n| `created_at` | When the account was set up; see [Dates and timezones](/v2/docs/dates-and-timezones) for the two formats |\n| `time_zone` | The account's timezone as an IANA name (`Europe/Dublin`). Each user has their own, and the user's is what the API applies to the dates it formats for them |\n| `billing.billing_currency` | The currency code (`EUR`) |\n| `billing.billing_type` | `bill_pay`, `pre_pay` or `mixed` |\n| `billing.sms_billing_type` | `bill_pay` or `pre_pay`: how SMS is charged |\n| `billing.account_balance` | The balance in `billing_currency`, two decimals |\n| `billing.sms_balance` | SMS credits available, rounded to a whole number: top-up credits plus, on a pre-pay account with a positive balance, what the balance buys at the account's SMS rate. `0` when the account is not active |\n\n## Security settings\n\n| Setting | Default | Effect |\n|---|---|---|\n| `allow_local_login` | `true` | `false` rejects every email-and-password login with code `4002`; users sign in with SSO only |\n| `allow_sso_logins` | `true` | `false` rejects Google and Microsoft sign-ins |\n| `oauth` | both providers enabled, `config` `[]` | One entry per provider: `provider`, `provider_name` (`GOOGLE`, `MICROSOFT`), `is_enabled`, `config` |\n| `enable_ip_restrictions` | `false` | With a non-empty `ip_whitelist`, logins from any other address are rejected with code `4004`. With an empty list the restriction is not applied |\n| `ip_whitelist` | `[]` | Entries as `id` and `ip_address` |\n| `require_2fa` | `false` | Every user must confirm a new device with the emailed code, whatever their own two-factor setting |\n| `should_periodically_reset` | `false` | A password expires `reset_period_months` after it was last changed; login then fails with code `4001` until it is changed |\n| `reset_period_months` | `6` | `1` to `12` |\n| `password_min_length` | `8` | `8` to `32` |\n| `password_must_mixed_case` | `true` | At least one upper-case and one lower-case letter |\n| `password_must_include_numbers` | `true` | At least one digit |\n| `password_must_include_symbols` | `true` | At least one symbol |\n| `password_is_uncompromised` | `false` | Rejects passwords found in public data leaks |\n\nUntil the settings have been saved in the portal, `GET` returns these defaults with `account_id`; after a save it also carries `created_at` and `updated_at`. The password rules apply when a password is changed, and the same rules are what [`GET /v2/account-password-requirements`](/v2/ref#/operations/v2.getPasswordRequirements) describes. Switching `should_periodically_reset` on records every user's current password at that moment, so the first expiry falls `reset_period_months` later for everyone.\n\n## Transcription languages\n\nThe language config decides which language [Speech To Text](/v2/docs/groups/speech-to-text) transcribes calls and voicemails in; the AI data in [Call AI](/v2/docs/groups/call-ai) is built from that transcript. `GET` answers, and `POST` takes, the same four keys:\n\n- `number_languages`: the default for calls, a list of codes from `GET /v2/language-options`. Required on `POST`, with at least one code.\n- `voicemail_languages`: the default for voicemails. On `POST`, `null` or omitted leaves it as it is; a list (`[]` included) replaces it.\n- `number_overrides`: one entry per number, `{\"in_ext\": \"35350534456\", \"languages\": [\"pl\"]}`. `in_ext` is the number as digits with the country code and no `+`, at most 20 characters. On `POST`, `null` or omitted leaves the overrides as they are; a list (`[]` included) replaces them all.\n- `voicemail_overrides`: one entry per voicemail box, `{\"voicemail_box\": 10, \"languages\": [\"en\"]}`, with the same replace-or-leave rule.\n\n`POST` answers `200` with the saved config. A call is transcribed in the language of the override for the number that handled it (the dialled number on an inbound call, the caller ID on an outbound one; after a transfer, the last number that took the call), otherwise in the account's default call language, otherwise in English. A voicemail uses its box's override, otherwise the default voicemail language, otherwise English. Voicemail languages and overrides need the Unlimited AI Call Analysis add-on (see [Speech To Text](/v2/docs/groups/speech-to-text)): without it `GET` returns them empty, `POST` ignores what you send for them and clears what was stored, and voicemails are transcribed in English.\n\n## AI call recap\n\nWhen enabled, every call that received an AI summary is followed by an email, *Nuacom AI: Your Call Recap*, to the configured recipients whose extension was on the call. The config has three keys:\n\n- `is_recap_email_enabled`: send `true` or `false`; it is returned as `1` or `0`.\n- `recipients`: a list of strings, each a user id (`\"12\"`) or a team id prefixed with `d` (`\"d431\"`, every member of the team). Every entry must be an active user or a team of your account, otherwise `422` with `One or more of the recipients are not available for your account.`. Send it on every call; `[]` clears the list. Users who are no longer active are dropped from the answer.\n- `extra_config`: `isDurationLimited` (`true` skips calls shorter than the limit), `durationLimitMinutes` (`0` to `15`), `durationLimitSeconds` (`0` to `59`), `shouldForwardToAdmins` and `forwardToAdminsIds` (account admins copied on every recap; a non-admin id answers `422` with `One or more of the selected admins are not account admins.`). The answer adds `durationTotalLimitSeconds`, computed from the minutes and seconds; a value you send for it, and any other key, is ignored.\n\n`POST` answers `200` with the saved config. The first `GET` on an account that never saved one answers the defaults: recap off, no recipients, no duration limit.\n\n## Roles and access\n\n- `GET /v2/account_info`, `GET /v2/account-password-requirements` and `GET /v2/language-options`: any authenticated user.\n- Security settings and AI config: account admins only; anyone else gets `403` `\"Forbidden\"`.\n- Language config, both endpoints: account admins, and only on accounts where NUACOM has enabled multilingual AI; otherwise `403`. Voicemail languages additionally need the Unlimited AI Call Analysis add-on, as described above.\n- The ISO dates option (per account) changes the format of `created_at` and `account_holder.last_login` in the account info and of `created_at` and `updated_at` in the security settings \u2014 see [Dates and timezones](/v2/docs/dates-and-timezones).\n\n## Pitfalls\n\n- The account info carries no add-ons: read the AI add-on from [`GET /v2/speech-to-text/active`](/v2/ref#/operations/accountAddonStt.currentAddon).\n- Enabling `enable_ip_restrictions` with an empty `ip_whitelist` restricts nothing; add the address you sign in from before enabling it, or the next login from elsewhere fails with code `4004`.\n- Only the first code of each language list is used; the rest is stored and returned but has no effect.\n- Store `in_ext` as digits without `+` (`35350534456`). A leading `+` passes validation but the number is looked up in the digits-only form, so such an override never matches a call.\n- `number_overrides` and `voicemail_overrides` are replaced wholesale whenever you send them: an entry left out is deleted.\n- `recipients` must be present on every `POST /v2/account-ai-config`; a request without it fails with `500`, not `422`. Send `[]` to clear the list.\n- A recipient receives the recap only for calls their own extension handled. To copy someone on every recap, list them, as an account admin, in `forwardToAdminsIds` with `shouldForwardToAdmins` on."
        },
        {
            "name": "Account / Settings"
        },
        {
            "name": "Account / Language Config"
        },
        {
            "name": "Account / AI Config"
        },
        {
            "name": "Account / Billing Info"
        },
        {
            "name": "Users",
            "description": "A user is a person who signs in to the NUACOM portal and apps: a name, email, mobile number and timezone, plus one **membership** per account they belong to that carries the account-level settings \u2014 admin or regular user, portal access, mobile extension, call-recording access, status and permissions. This group holds the legacy pair [`GET /v2/users_list`](/v2/ref#/operations/account.users) and [`GET /v2/user_info`](/v2/ref#/operations/user.view) and the v3 family: the paginated list, one user, the update, and the caller's own profile. A user is linked to at most one extension per account (managed in [Extensions](/v2/docs/groups/extensions)) and belongs to any number of teams; creating, suspending and deleting users is done in the portal.\n\n## Workflow (what the portal does)\n\n1. **Who is calling**: [`GET /v2/user_info`](/v2/ref#/operations/user.view) answers the session context the apps load at start-up: `user_id`, `user_name`, `account_id`, `account_name`, `user_country`, `time_zone`, `user_shared_accounts` (the other accounts the user is active in), `user_admin`, `recording_access`, `outbound_cli`, `user_extension` (only when the user has an extension) and `call_events`. With an API key this describes the user the key acts as (see [Authentication](/v2/docs/authentication)).\n2. **My profile**: [`GET /v3/users/me`](/v2/ref#/operations/v3.users.me) returns the caller's own user record: `user_id`, `user_name`, `user_email`, `mobile`, `country_dial_code`, `time_zone`, `last_login`, `extension` (the number, or `\"\"` when none), `user_active` and `account` (one membership row per account the user is active in).\n3. **List**: [`GET /v3/users`](/v2/ref#/operations/v3.users.users.index) with `page` and `per_page` (default 25, no maximum), newest first. Each row is `user_id`, `user_name`, `user_email`, `mobile`, `last_login`, `extension`, `user_active` and `departments` (the user's teams, `id` and `name`); the response is `{\"data\": [...], \"links\": {...}, \"meta\": {...}}`. Active, suspended and awaiting-activation members are listed; deleted ones are not.\n   [`GET /v2/users_list`](/v2/ref#/operations/account.users) is the same set as one flat, unpaginated array in the V1 shape: each row adds the membership flags (`account_admin`, `web_access`, `call_recording`, `mobile_extension`, `user_active`, `active_in_account`), `country_iso_code`, `country_dial_code`, `is_auth_2fa_enabled`, `user_extension` and `outbound_cli`. Two optional switches: `checkAdmin=1` makes a regular user receive only their own row, and `enterprise_only=true` keeps only users whose extension has an Enterprise or Unlimited subscription.\n4. **One user**: [`GET /v3/users/{user}`](/v2/ref#/operations/v3.users.users.show) by `user_id` answers `{\"user\": {...}}`: the profile with its `departments` and an `account` array listing every membership the user has, each carrying the flags above. A user who is not a member of your account, or was deleted, answers `404`.\n5. **Edit** (what the Users screen saves): [`PUT /v3/users/{user}`](/v2/ref#/operations/v3.users.users.update) with the complete form:\n   - `user.user_name` (required, at most 64 characters), `user.mobile` (at most 30), `user.country_dial_code` (integer), `user.time_zone` (IANA name, at most 20 characters), `user.is_auth_2fa_enabled` (boolean);\n   - the membership flags as `0`/`1`: `user.account_admin`, `user.web_access`, `user.mobile_extension`, `user.call_recording`;\n   - `user.departments`: the teams as `[{\"value\": <team id>}]` \u2014 the list replaces the user's teams;\n   - `pages`: the ids of the portal pages the user may open \u2014 pages left out are revoked. Page ids are assigned in the portal (**Settings \u2192 Users \u2192 Permissions**); the API has no public catalogue of them.\n   The answer is `{\"success\": true}`. `user.extension` is accepted but ignored, and permissions are not part of the form: both are set in the portal.\n7. **Teams**: a user's `departments` are the account's teams. Add or remove a member with [`PUT /v3/teams/{teamId}/users/{user}`](/v2/ref#/operations/v3.teams.users.update) and [`DELETE /v3/teams/{teamId}/users/{user}`](/v2/ref#/operations/v3.teams.users.destroy), list a team's members with [`GET /v3/teams/{teamId}/users`](/v2/ref#/operations/v3.teams.users.index) and the teams themselves with [`GET /v3/teams`](/v2/ref#/operations/v3.teams.teams.index). The v2 [`GET /v2/departments`](/v2/ref#/operations/departments.index) endpoints work on the same objects under the older name.\n\nCreating, suspending and deleting users is done in the portal (**Settings \u2192 Users**); there is no public endpoint for it. Deleting a user there offers to hand their private contacts to a colleague first.\n\n## Reading a user\n\n- **Admin or regular user**: `account_admin` on the membership (`user_admin` in `/v2/user_info`). An admin sees the whole account and may call the admin-only endpoints; a regular user sees their own extension plus what their permissions grant, and admin-only endpoints answer `403`. The flag is per account: the same person can be an admin in one account and a regular user in another.\n- **Call recording access**: `call_recording` is the portal's \"Call Recording Access\" toggle. Through the API every user, admins included, needs it on to play recordings, and the account's recording add-on or the extension's subscription must include recording; `recording_access` in `/v2/user_info` is that combined answer.\n- **Status**: `user_active` is `0` suspended, `1` active or `2` awaiting activation (the user has not completed sign-up). Deleted users never appear.\n- **Portal and mobile**: `web_access` \u2014 may sign in to the web portal; `mobile_extension` \u2014 may use a mobile extension.\n- **Extension**: `extension` (v3) or `user_extension` (v2) is the number of the user's extension in this account, and `outbound_cli` the caller ID that extension presents. Linking is done by an admin in the portal's Users screen; the extension itself is managed in [Extensions](/v2/docs/groups/extensions).\n- **Timezone**: `time_zone` is the user's IANA timezone. It is the default for every date the API formats for that user when you send no `X-Timezone` header.\n- **last_login**: `null` when the user has never signed in. With the account's ISO dates option the value is ISO 8601 in the `X-Timezone` you send, UTC by default (`2024-08-28T09:15:00+01:00`); without it, `/v2/users_list` gives wall-clock `Y-m-d H:i:s` and the v3 endpoints keep only the day (midnight, serialised as a UTC timestamp). See [Dates and timezones](/v2/docs/dates-and-timezones).\n- **Several accounts**: a user may belong to more than one account. `active_in_account` marks the one they are currently working in, `user_shared_accounts` lists the others, and the `account` array of the v3 profile has one row per membership \u2014 pick yours by `account_id`.\n- **API keys**: a key acts as the user who created it; that user's admin flag, permissions and recording access decide what the key sees, and `GET /v2/user_info` with the key tells you who that is. See [Authentication](/v2/docs/authentication).\n\n## Roles and access\n\n- Every endpoint in this group accepts any authenticated user; none is restricted to account admins. The lists are not filtered by the caller's permissions either: a regular user sees every member, except with `checkAdmin=1` on `/v2/users_list`.\n- The ISO dates option (per account) changes the `last_login` format as described above. \n- A user outside your account answers `404` from `/v3/users/{user}`.\n\n## Pitfalls\n\n- The pagination links of `GET /v3/users` use `users=` as the page parameter, but the endpoint reads `page`: following `links.next` returns the first page again. Build the URL yourself from `meta.current_page` and `meta.last_page`.\n- `/v2/users_list` returns `user_id`, `user_active` and `country_dial_code` as strings (`\"123\"`, `\"1\"`, `\"353\"`); the v3 endpoints return integers.\n- `PUT /v3/users/{user}` is a full replacement with no partial update: send every `user.*` field, `user.departments` and `pages` even when unchanged. A missing field fails the request with `500`, not `422`.\n- `user.time_zone` is limited to 20 characters, so longer IANA names (`America/Argentina/Buenos_Aires`) are rejected with `422`.\n- A suspended member is listed and readable, but a `PUT` on them fails with `500`.\n- `departments` is present only where the endpoint loads it: in the list and in `/v3/users/{user}`.\n- `/v2/user_info` omits `user_extension` and `call_events` rather than returning `null` when the user has no extension or has not enabled call events."
        },
        {
            "name": "Extensions",
            "description": "An extension is a SIP line on the account: a number in the range 10\u20139999, a display name, a subscription tier, an optional linked user and device. This group lists extensions, creates and deletes them and sets their live status; pricing previews, pre-pay creation and tier changes sit in the Extensions / Subscriptions group next to it. Per-extension settings such as voicemail, call handling and caller-ID preselection are set in the portal.\n\n## Workflow (what the portal does)\n\n1. **List**: [`GET /v2/extensions`](/v2/ref#/operations/extensions.index) answers a plain array of `{number, name, extension_is_used, subscription}`. An admin sees the whole account; a regular user sees their own extension and the ones granted to them.\n2. **Caller-ID numbers**: [`GET /v2/extensions/available-cli`](/v2/ref#/operations/v2.extensionsAvailableCli) lists the account's numbers an extension can present. [`GET /v2/user_info`](/v2/ref#/operations/user.view) gives the calling user's profile and outbound CLI.\n3. **Create** (account admin): pick a tier from [`GET /v2/subscriptions`](/v2/ref#/operations/subscriptions.index), then\n   - bill-pay and trial accounts call [`POST /v2/extensions/store`](/v2/ref#/operations/extensions.store) with `from`, `to` (at most ten numbers per call), `subscription_id` and `callerID`;\n   - pre-pay accounts buy the licences first in the portal, and create the extensions once the payment is confirmed.\n4. **Subscriptions** (account admin): [`add-subscription`](/v2/ref#/operations/extensions.addSubscription) for an extension without one, [`change-subscription`](/v2/ref#/operations/extensions.changeSubscription) to move tiers. [`DELETE /v2/extensions/{extNumber}/subscription`](/v2/ref#/operations/extensions.cancelSubscription) cancels the subscription **and deletes the extension**.\n5. **Rename**: [`PUT /v2/extensions/{extNumber}/set-name`](/v2/ref#/operations/extensions.updateExtensionName).\n6. **Delete** (account admin): [`DELETE /v2/extensions`](/v2/ref#/operations/extensions.deleteExtensions) with an `extensions[]` body. An extension with a provisioned device cannot be deleted this way (`422`), and at least two extensions must remain (`400`).\n7. **Queues**: [`POST /v2/extensions/set-dynamic-agent-queue-status`](/v2/ref#/operations/extensions.updateDynamicAgentQueueStatus) logs an extension in or out of a queue (`queue`, `extension`, `action`).\n8. **Availability report**: [`GET /v2/extension-activity`](/v2/ref#/operations/extensionActivity.index) returns each extension's online sessions for a `date`, optionally filtered by `departmentId` (from [`GET /v2/departments`](/v2/ref#/operations/departments.index)) or `extensions`.\n\nLinking an extension to a user is done by an admin in the portal's Users screen.\n\n## Creating an extension\n\n```mermaid\nflowchart TD\n    tier[\"GET /v2/subscriptions: pick a tier\"] --> type{\"Account type\"}\n    type -- \"bill-pay or trial\" --> billpay[\"POST /v2/extensions/store<br/>from, to, subscription_id, callerID\"]\n    billpay --> billready[\"Extension created\"]\n    type -- \"pre-pay\" --> buy[\"Buy the licences in the portal\"] --> prepayready[\"Create the extensions once paid\"]\n```\n\n## Roles and access\n\n- Creating, deleting, renaming, changing subscriptions, pricing previews and the status endpoint require an **account admin** (`403` otherwise).\n- Listing, the caller-ID lookups, the agent queue status (for your own extension) and the availability report are open to any authenticated user.\n- The ISO dates option switches the availability report's timestamps to ISO 8601.\n\n## Pitfalls\n\n- Numbers 112, 171, 777 and 999 are reserved. In a `from`\u2013`to` range, numbers already taken are skipped silently; you only get an error when none is left.\n- `callerID` is copied as sent and is not validated. Use a number from `available-cli`.\n- Pre-pay creation and tier changes are asynchronous: `204` means the payment was accepted, not that the extension exists yet. Poll the list.\n- Pre-pay downgrades take effect on the first day of the next month; pre-pay upgrades are paid in the portal's checkout.\n- Cancelling a subscription deletes the extension, including its device link, voicemail and queue membership.\n- `status` values are case-sensitive: `Busy` or `Active`.\n- SIP credentials are never returned by the API; they are shown in the portal.\n- The availability report is account-wide: it is not filtered by the caller's permissions."
        },
        {
            "name": "Extensions / Subscriptions"
        },
        {
            "name": "Departments",
            "description": "Departments are the original name of [Teams](/v2/docs/groups/teams): the same named groups of users, with the same ids. This group holds the four v2 endpoints: one flat list that embeds the members of every department, and three admin-only writes that answer a boolean. Prefer the v3 Teams endpoints for new work; use this list when you want every department with its members in one request.\n\n## Workflow (what the portal does)\n\n1. **List**: [`GET /v2/departments`](/v2/ref#/operations/departments.index) takes no parameters and answers a plain array, not a page, with every department of the account: `id`, `name` and `users`, the members as `user_id`, `user_name` and `user_email`.\n2. **Create** (account admin): [`POST /v2/departments/store`](/v2/ref#/operations/departments.store) with `name` (required, at most 20 characters) answers `201` with `id`, `name` and an empty `users`. Members are added afterwards through [Teams](/v2/docs/groups/teams), or with `user.departments` on [`PUT /v3/users/{user}`](/v2/ref#/operations/v3.users.users.update) (see [Users](/v2/docs/groups/users)).\n3. **Rename** (account admin): [`PUT /v2/departments/{department}/update`](/v2/ref#/operations/departments.update) with `name` answers the JSON boolean `true`. The name is the only thing this endpoint changes.\n4. **Delete** (account admin): [`DELETE /v2/departments/{department}/delete`](/v2/ref#/operations/departments.destroy) answers `true`.\n\nAn unknown `{department}`, or one of another account, answers `404` from rename and delete. Each create, rename and delete is recorded in the account's change log as `User group <name> has been added`, `renamed to <new name>` or `deleted`.\n\n## Departments, users and extensions\n\n- A department is a set of users: a user may belong to several departments, and a department may be empty. Membership is the only relation a department has.\n- Extensions follow their users. A user has at most one extension per account (see [Extensions](/v2/docs/groups/extensions)), so \"the extensions of a department\" means the extensions of its members. That is how the availability report [`GET /v2/extension-activity`](/v2/ref#/operations/extensionActivity.index) applies its `departmentId` filter, and how an AI call recap addressed to a department reaches the members whose extension was on the call.\n- Departments carry no numbers, queues or permissions. What they gate \u2014 call tag visibility, conversation assignment, report filters and recap recipients \u2014 is listed under *What a team does* in [Teams](/v2/docs/groups/teams).\n\n## Roles and access\n\n- The list is open to any authenticated user. Create, rename and delete require an account admin; anyone else gets `403` `\"Forbidden\"`.\n\n## Pitfalls\n\n- The paths carry the verb: `POST \u2026/store`, `PUT \u2026/{department}/update`, `DELETE \u2026/{department}/delete`. There is no `GET /v2/departments/{department}`; read one department from the list, or from [`GET /v3/teams/{teamId}`](/v2/ref#/operations/v3.teams.teams.show).\n- Create answers `201` with the department; rename and delete answer a bare `true`, not the department.\n- The list is unpaginated and always embeds the members. `users` carries no status, so a suspended member looks like an active one; check `user_active` in [Users](/v2/docs/groups/users).\n- `name` is limited to 20 characters and is not unique: two departments can share a name.\n- `name` is the only field the writes accept; anything else in the body is ignored, so members cannot be set here.\n- Validation errors answer `422` as `{\"errors\": {...}}`; a missing department answers `404` with `{\"message\": \"Resource not found!\"}`."
        },
        {
            "name": "Teams",
            "description": "A team is a named group of users in the account. Teams label users rather than extensions: they decide which call tags a user may see, where a conversation can be assigned, who receives the AI call recap email and which extensions the availability report shows. This group holds the v3 team list and the create, read, update and delete endpoints, plus, under **Teams / Users**, the membership endpoints. The v2 [Departments](/v2/docs/groups/departments) endpoints work on the same records under their older name, so a team `id` here is a department id there.\n\n## Workflow (what the portal does)\n\n1. **List**: [`GET /v3/teams`](/v2/ref#/operations/v3.teams.teams.index) with `page` (15 teams per page; `per_page` is not read), `sort` (`id` or `-id`; `id` by default) and `include`: `usersCount` fills `users_count`, `users` embeds the full member list, `team` embeds a preview of at most three members. The response is `{\"data\": [...], \"links\": {...}, \"meta\": {...}}`; each team is `id`, `name` and `users_count` (`null` unless you include it). An unknown `include` or `sort` answers `400`.\n2. **Create**: [`POST /v3/teams`](/v2/ref#/operations/v3.teams.teams.store) with `name` (required, at most 20 characters) and optional `members`, an array of user ids. Every id must be a user of your account whose membership has not been deleted; otherwise `422` with `One or some of the provided users does not belong to this account.`. Answers `201` with the team's `id` and `name`. Pick the ids from [`GET /v3/users`](/v2/ref#/operations/v3.users.users.index) (see [Users](/v2/docs/groups/users)).\n3. **Read**: [`GET /v3/teams/{teamId}`](/v2/ref#/operations/v3.teams.teams.show) answers `id`, `name`, `users_count` and `users`, the members as user rows (`user_id`, `user_name`, `user_email`, `mobile`, `extension`, `user_active`, `last_login`). An unknown id, or a team of another account, answers `404`.\n4. **Rename or replace the members**: [`PUT /v3/teams/{teamId}`](/v2/ref#/operations/v3.teams.teams.update) takes the same body as create. `members` replaces the whole membership, and a request without `members` empties the team. Answers `200` with `id` and `name`.\n5. **One member at a time**: [`GET /v3/teams/{teamId}/users`](/v2/ref#/operations/v3.teams.users.index) lists the members, 15 per `page`, as the user rows above; [`PUT /v3/teams/{teamId}/users/{user}`](/v2/ref#/operations/v3.teams.users.update) adds the user (no body) and answers `200` with the team and its new `users_count`; [`DELETE /v3/teams/{teamId}/users/{user}`](/v2/ref#/operations/v3.teams.users.destroy) removes them and answers `204`. A `{user}` who is not a member of your account answers `404`. The same membership is edited from the user's side with `user.departments` on [`PUT /v3/users/{user}`](/v2/ref#/operations/v3.users.users.update).\n6. **Delete**: [`DELETE /v3/teams/{teamId}`](/v2/ref#/operations/v3.teams.teams.destroy) answers `204`.\n\n## What a team does\n\nTeams are used by reference, through their `id`, in these places:\n\n- **Users**: every row of [`GET /v3/users`](/v2/ref#/operations/v3.users.users.index) and the profile in [`GET /v3/users/{user}`](/v2/ref#/operations/v3.users.users.show) carry `departments`, the user's teams as `id` and `name`.\n- **Call tags**: a tag with the visibility rule `{\"type\": 2, \"allowed_id\": <team id>}` is shown only to the members of that team \u2014 see [Call Tags](/v2/docs/groups/call-tags).\n- **Conversations**: an SMS or WhatsApp conversation can be assigned to a team (`department_id` on the assign endpoint, `assigned_department_id` on the conversation), and the auto-assignment rules can target a team \u2014 see [Conversations](/v2/docs/groups/conversations).\n- **Extension activity**: the availability report in [Extensions](/v2/docs/groups/extensions) takes `departmentId` and keeps only the extensions of that team's members.\n- **AI call recaps**: the recipients of the recap email are user ids and team ids written as `d<id>` \u2014 see [Account](/v2/docs/groups/account).\n\nA team owns no extension, number or queue. Whatever applies to a team applies to the extensions of its members: a user has at most one extension per account, so a team's extensions are its members' extensions.\n\n## Roles and access\n\n- Every endpoint in this group, writes included, is open to any authenticated user of the account; none requires an account admin. The v2 [Departments](/v2/docs/groups/departments) endpoints, by contrast, allow writes to admins only.\n- Teams belong to the account of the token: another account's team id answers `404`, and `members` may name only users of your account.\n- The ISO dates option (per account) changes the `last_login` format in member rows \u2014 see [Dates and timezones](/v2/docs/dates-and-timezones).\n\n## Pitfalls\n\n- `PUT /v3/teams/{teamId}` is a full replacement: a body with only `name` removes every member. Send the complete `members` list, or use the per-member endpoints.\n- Team names are not unique: two teams can share a name, so key your data on `id`.\n- `users_count` is `null` on the list unless you add `include=usersCount`, and `null` on the create and update answers; `users` is present only on `GET /v3/teams/{teamId}` and with `include=users`.\n- `include=team` is a preview capped at three members per team; use `include=users` or the members endpoint for the full list.\n- The page size is fixed at 15; `per_page` is ignored.\n- Adding a user who is already a member answers `200` and changes nothing; removing a user who is not a member answers `204`.\n- Validation errors answer `422` as `{\"errors\": {...}}`.\n- The same number identifies a team everywhere: `id` here, `{department}` in the v2 endpoints, `allowed_id` in call tag visibility and `d<id>` in the AI recap recipients."
        },
        {
            "name": "Teams / Users"
        },
        {
            "name": "Numbers",
            "description": "Numbers are the public phone numbers (DIDs) callers dial to reach the account. This group lists the numbers the account holds and covers getting new ones: the countries and prices on offer, searching NUACOM's stock and the provider catalogues, filing an order request, including the identity and address proof some countries require. Where a number's calls go (an extension, a queue or an [IVR](/v2/docs/groups/ivr)) is set in the portal under Numbers & Inbound Call Routing; the API has no routing endpoint. Number Providers and Porting are managed by NUACOM and have no public endpoints: to move an existing number to NUACOM, contact support, who need your authorisation before the port is requested.\n\n## Workflow (what the portal does)\n\n1. **The account's numbers**: [`GET /v2/my-numbers`](/v2/ref#/operations/account.myNumbers) answers a plain array with one `{\"in_ext\", \"number_name\"}` object per assigned number. `in_ext` is the number as international digits without `+` (`35312345678`); `number_name` is the label given to the line, which, when enabled for that number, is appended to the caller ID name of inbound calls so agents see which line was called. That is the whole row: country, routing target and capabilities are not returned. The numbers an extension may present as caller ID come from [`GET /v2/extensions/available-cli`](/v2/ref#/operations/v2.extensionsAvailableCli) (see [Extensions](/v2/docs/groups/extensions)), fax numbers from [`GET /v2/fax`](/v2/ref#/operations/fax.index).\n2. **Countries and prices** (account admin): [`GET /v2/numbers/order/countries-info`](/v2/ref#/operations/orderPhoneNumber.infoByCountries) answers one row each for Ireland, the United States and the United Kingdom (`iso` in lower case: `ie`, `us`, `gb`) with `name`, `priceMonthly` (the lowest monthly price in euro), `price` (the same as text, `\u20ac5 / month`, with a leading space) and `currency` (`\u20ac`), followed by an `Others Regions` row with `iso` `xx`, `price` `Custom Price` and `priceMonthly` `null`.\n3. **Search the catalogue** (account admin): [`GET /v2/numbers/order/search-available-numbers`](/v2/ref#/operations/orderPhoneNumber.searchAvailableNumbers) with `category=paid_1` (the only value accepted), `iso` (the country, `IE`) and optionally `type` (`Local`, `National`, `Mobile`, `Toll-free`, `Shared Cost` or `Global`) and `areaCode` (digits are matched against the provider's area prefix, text against the area name, for example `Dublin`). It answers up to 20 rows of `{\"number\", \"country_iso\", \"monthly_price\"}` with `number` in E.164 (`+35312345678`) and the monthly price in euro.\n4. **File the order** (account admin): [`POST /v2/numbers/order/phone-number-request`](/v2/ref#/operations/orderPhoneNumber.orderPhoneNumberRequest) with `category: \"paid_1\"`, `numbers` as an array of `{\"number\", \"price\"}` objects copied from the search (`price` is the monthly price) and an optional `description`. The request is recorded and opens a ticket with NUACOM's number team, who contact the requesting user to complete the purchase; the call itself provisions nothing. It answers `200` with `{\"status\": \"success\", \"numbers\": [...]}` echoing the array, or `400` with `{\"status\": \"error\"}` when the request could not be recorded.\n5. **Search the stock**: [`GET /v2/numbers/search`](/v2/ref#/operations/numbers.search) takes `category` (`free`, `paid_1`, `paid_2` or `paid_3`), optional `iso` (ISO 3166-1 alpha-2) and `number_contains` (2 to 20 digits, optional leading `+`). `free` lists numbers NUACOM already holds in stock, ten per page as `{\"id\", \"number\"}` rows in `data` with `current_page` and `next_page_url`, narrowed by dial code and area with `country_code` and `area_code`. The paid categories are the provider catalogues, answered as one array of rows with `number` (digits without `+`), `country_iso`, `area_name`, `prefix`, `features` (`sms` when the number supports SMS), `needs_registration`, `restriction_message`, the provider's `setup_price` and `monthly_price`, and the prices you pay, `setup_price_with_fee` and `monthly_price_with_fee`. Ordering a number from these results goes through the request flow above; the direct assignment the portal uses is not a public endpoint.\n6. **Registration**: when the chosen row has `needs_registration: true`, read [`GET /v2/numbers/get-requirements`](/v2/ref#/operations/numbers.getRequirements) with `category` (`paid_1` or `paid_2`) and `country_iso` first. For `paid_1` it answers `address_area_level`, `business_area_level`, `business_mandatory_fields`, `service_description_required`, `proof_types`, `business_permanent_document`, `business_onetime_document`, `restriction_message` and `country`. Send the assign request as `multipart/form-data` with `company_name`, `first_name`, `last_name`, `phone_number`, `address[country_iso]`, `address[city_name]`, `address[postal_code]`, `address[address]`, `service_description` when required, every field named in `business_mandatory_fields`, and the documents: `proofs[0][type]` (an id from [`GET /v2/numbers/proof-types`](/v2/ref#/operations/numbers.getProofTypes)) with `proofs[0][files][]`, and `supporting_documents[0][template]` (an id from [`GET /v2/numbers/supporting-document-types`](/v2/ref#/operations/numbers.getSupportingDocuments); `permanent` says whether the document stays on file) with `supporting_documents[0][files][]`. The provider verifies the address after the order and NUACOM records that verification against the number.\n\n## Roles and access\n\n- Any authenticated user: `GET /v2/my-numbers`, `GET /v2/numbers/search`, `GET /v2/numbers/get-requirements`, `GET /v2/numbers/proof-types` and `GET /v2/numbers/supporting-document-types`.\n- Account admin (`403` otherwise): the three `/v2/numbers/order/...` endpoints.\n\n## Pitfalls\n\n- `GET /v2/my-numbers` is the only list of the account's numbers and it holds two fields. Numbers are digits without `+`; the search endpoints answer them with `+` (order search) or without (direct search).\n- `category` differs per endpoint: the order endpoints accept only `paid_1`, `get-requirements` accepts `paid_1` and `paid_2`, search and assign accept `free`, `paid_1`, `paid_2` and `paid_3`. Any other value is `422`.\n- The order search returns at most 20 numbers and silently leaves out numbers whose setup price, fee included, is above 5. An `areaCode` that matches nothing is ignored and the whole country is searched; an unknown `iso` answers `200` with `[]`, not `422`.\n- `numbers` on the order request must be objects with `number` and `price`; plain strings answer `400`. The request is a ticket, not a purchase: the numbers reach `GET /v2/my-numbers` only once NUACOM completes the order.\n- When `address_area_level` is `Area`, `address[country_iso]` must equal the number's country (`422`).\n- Monthly prices on the order endpoints and the `*_with_fee` prices on the direct search include NUACOM's fee and are rounded up to a multiple of 5; `setup_price` and `monthly_price` on the direct search are the provider's raw prices.\n- `number_contains` takes 2 to 20 digits; a leading `+` is accepted and stripped; wildcards and letters answer `422`. The `free` search is simple pagination without a total: follow `next_page_url`."
        },
        {
            "name": "Number Blocking",
            "description": "Number Blocking stops calls before they are placed or delivered, with two kinds of rules. **Destination rules** block a whole call class of the account's rate plan (a country, a number range or a service type, identified by a dial-prefix mask) for some or all extensions; they are the `/v2/calls-block-unblock` family and need an account admin. **Blocked numbers** block one phone number, inbound and/or outbound, for the whole account; they are `/v3/number-blocking`. The neighbouring Blacklist Numbers group is not about calls: it is the messaging block list, described at the end of this guide.\n\n## Workflow (what the portal does)\n\n1. **Destination rules**: [`GET /v2/calls-block-unblock`](/v2/ref#/operations/calls-block-unblock.index) with `page` and `perPage` (both required; `perPage` is 15, 25, 50, 100 or -1), `sort` (`name` by default, `-name` for descending), `filter[sSearch]` (a substring of the destination name or of its prefix mask) and `extension` (comma-separated extension numbers; the status of each destination is then computed for those extensions only, otherwise for every extension of the account). The answer is DataTables-shaped: `aaData[]` rows with `class_id` (one or more comma-separated destination ids that share a name), `class_name`, `class_mask` (the dialled-prefix pattern, such as `^00`) and `blocked`, which is `1` when blocked for every extension considered, `0` when allowed and `-1` when blocked for some of them; `iTotalRecords` and `iTotalDisplayRecords` carry the total.\n2. **Block or unblock**: [`POST /v2/calls-block-unblock`](/v2/ref#/operations/calls-block-unblock.store) with `action` (`0` to block, `1` to unblock), `extensions` (comma-separated extension numbers, each of which must exist on the account) and `destinations` (comma-separated `class_id` values from the list; pass a row's whole `class_id` string). Both are optional and the four combinations differ: both filled applies the action to those destinations for those extensions; `destinations` alone to those destinations for every extension; `extensions` alone to every destination for those extensions; neither to every destination for every extension, that is, block all or unblock all. The answer is `204`; read the list again to see the resulting status.\n3. **Copy rules between extensions** is a portal action (**Call Blocking \u2192 Copy rules**); through the API, create the same rules on each extension.\n4. **Blocked numbers**: [`GET /v3/number-blocking`](/v2/ref#/operations/v3.number-blocking.index) with `page` and `perPage` (both required; 15, 25, 50 or 100), `filter[search]` (a substring of the number or of the notes) and `sort` (`phone_number` by default, `inbound`, `outbound` or `notes`, `-` for descending). A standard paginated answer: `data[]` rows of `{\"entry_id\", \"phone_number\", \"inbound\", \"outbound\", \"notes\"}` with `links` and `meta` (`total`, `per_page`, `current_page`, `last_page`).\n5. **Add a blocked number**: [`POST /v3/number-blocking`](/v2/ref#/operations/v3.number-blocking.store) with `phone_number` (up to 20 characters, unique within the account), `inbound` and `outbound` (booleans: refuse calls from the number, refuse calls to it) and optional `notes`. The answer is `204` with no body: list again to learn the `entry_id`.\n6. **Edit or remove**: [`PUT /v3/number-blocking/{entryId}`](/v2/ref#/operations/v3.number-blocking.update) takes the same fields as the create (`phone_number` is required again; a flag you leave out keeps its value) and [`DELETE /v3/number-blocking/{entryId}`](/v2/ref#/operations/v3.number-blocking.destroy) removes the entry. Both answer `204`; an id that does not belong to the account answers `404`.\n\n## Blacklist Numbers\n\nThe Blacklist Numbers group is the account's messaging block list, not a call rule: a number on it is never sent an SMS, MMS or WhatsApp message by the account. A send to it is created with status `4` (failed), `error_code` `BLOCKED` and the description `Recipient is blocked or opted out` (see [Conversations](/v2/docs/groups/conversations)), and the number shows `sms_blocked: true` on a contact's phones in [Contacts](/v2/docs/groups/contacts). Calls are not affected; use the blocked numbers above for that. [`GET /v3/blacklist-numbers`](/v2/ref#/operations/v3.blacklist-numbers.index) lists the manually blocked numbers as `{\"id\", \"mobile_number\", \"account\", \"status\", \"notes\", \"entrydate\"}`; [`POST /v3/blacklist-numbers`](/v2/ref#/operations/v3.blacklist-numbers.store) with `mobile_number` (up to 20 characters) and optional `notes` (up to 50) answers `201` with the row, or `204` when it was already blocked; [`GET /v3/blacklist-numbers/{mobileNumber}`](/v2/ref#/operations/v3.blacklist-numbers.show) answers the row, or `204` when the number is not blocked; [`DELETE /v3/blacklist-numbers/{mobileNumber}`](/v2/ref#/operations/v3.blacklist-numbers.destroy) unblocks it (`204`). `status` is `2` for a number blocked through this endpoint and `3` for a number that opted out of the account's messages; only `2` rows are listed, shown and deleted here, but both stop sends, and a `POST` for an opted-out number turns it into a `2` row.\n\n## Roles and access\n\n- The destination rules (list, block or unblock) need an **account admin**; other users get `403`.\n- Blocked numbers (`/v3/number-blocking`) and the blacklist (`/v3/blacklist-numbers`) are open to any authenticated user of the account.\n\n## Pitfalls\n\n- `action` is the opposite of what the name suggests: `0` blocks, `1` unblocks.\n- There is no `all` keyword on the block call: `extensions=all` answers `422` with `One or more extensions are invalid.`, and `destinations` has no such value either. Leave the field out, or send it empty, to mean \"all\".\n- `blocked` in the list is an integer, not a boolean, and `-1` (partially blocked) appears whenever only some of the extensions considered are blocked. Pass `extension` to get the answer for specific extensions.\n- A row's `class_id` can hold several ids (`12,13`). Send that whole string in `destinations`; the ids grouped under one name are one destination to the portal.\n- Both lists require `page` and `perPage` (`422` without them); an unknown `filter[...]` or `sort` answers `400`. The `/v3/number-blocking` list has no `-1` page size.\n- `POST /v3/number-blocking` returns no id, and `inbound` and `outbound` you leave out are stored as `null`, not `false`: send both flags explicitly.\n- `phone_number` on `/v3/number-blocking` is stored exactly as sent and the uniqueness check is an exact string match, so `+353861234567` and `00353861234567` are two entries. Use one format consistently.\n- Blacklist a number as `00` followed by the country code and number (`00353861234567`): that is the form the send-time check compares against. A copy with a `+` or in national format is listed but may not stop the send.\n- `GET /v3/blacklist-numbers/{mobileNumber}` and the delete ignore opted-out rows (`status` `3`): the check answers `204` for them and the delete leaves them in place."
        },
        {
            "name": "Blacklist Numbers"
        },
        {
            "name": "Marked Mobile Numbers"
        },
        {
            "name": "IVR",
            "description": "An IVR (auto-attendant) menu plays a greeting and routes the caller by the key they press, with separate behaviour for open hours, closed hours and the case where no key is pressed. In V2 this group is a single operation, [`PUT /v2/ivr/{id}/menu`](/v2/ref#/operations/v2.ivrMenu), which **replaces the whole configuration** of IVR `{id}`. Listing, creating and deleting IVRs is still done through V1 (`GET /v1/ivr_menu`, `POST /v1/ivr_menu_new`, `DELETE /v1/ivr_menu/{id}`), and an IVR is attached to a number in the portal under Numbers & Inbound Call Routing.\n\n## Workflow (what the portal does)\n\n1. `GET /v1/ivr_menu` returns every IVR with its `name` and a `data` object in exactly the shape the PUT expects. Edit that object rather than building one from scratch.\n2. Collect the identifiers your actions will point at:\n   - announcement slots 10\u201399, uploaded with [`POST /v2/announcements/upload-audio`](/v2/ref#/operations/announcements.uploadAudio) (account admin);\n   - extension numbers from [`GET /v2/extensions`](/v2/ref#/operations/extensions.index);\n   - **queue numbers** (not queue ids) from [`GET /v2/queues`](/v2/ref#/operations/queues.index);\n   - SMS template ids from [`GET /v2/sms-templates`](/v2/ref#/operations/sms-templates.index) for \"send a message\";\n   - call tag ids, other IVR ids, or a phone number for \"forward\".\n3. Build `data`:\n   - `options_msg_enabled`: whether digits 0\u20139 are offered at all.\n   - `initial.ring_duration` (0\u201330 seconds) and `initial.message` (an announcement slot): what happens before the menu.\n   - `open.message`, `open.pause` (seconds to wait for a key: 0.1, 0.5, 1\u202620, 25 or 30), `open.actions` (exactly ten entries, digits 0\u20139) and `open.fall_through` (no key pressed).\n   - `close.actions` for out-of-hours calls and, when its first action is \"play message\" (`1`), `close.on_event_actions` for a key pressed during that message.\n   - Every action is `{\"action_1\": {\"id\", \"value\"}, \"action_2\": {\"id\", \"value\"}}`. `value` is always a string of at most 50 characters: an extension number, a queue number, an announcement slot, an IVR id, a phone number, comma-separated tag ids or a template id.\n4. `PUT /v2/ivr/{id}/menu` with `name` and `data`. `204` means saved, and the change is live for the next call: there is no provisioning step.\n5. Opening hours and holidays live outside this group and take `menu_id` = the IVR id: opening hours through V1 (`PATCH /v1/opening_hours`), public holidays with [`PATCH /v2/ivr/public_holiday_settings`](/v2/ref#/operations/publicHolidaySettings.update) and custom holidays with [`PATCH /v2/ivr/custom_holiday_settings`](/v2/ref#/operations/customHolidaySettings.update).\n\n## Actions\n\n- First action (`action_1.id`): `0` hang up, `1` play message, `2` dial extension, `3` join queue, `4` play prompt then dial the entered number, `6` voicemail, `7` repeat the options, `8` forward to a number, `9` go to another IVR, `13` add a call tag, `14` send a message.\n- Second action (`action_2.id`): `0` none, `1` dial extension, `2` join queue, `4` dial the entered number, `5` fall through, `6` voicemail, `8` forward, `9` go to another IVR, `14` send a message.\n- Chaining: after `1`, `3` or `13` any second action is allowed; after `4` only `4` or `14`; after everything else `action_2.id` must be `0`. The fall-through slot has no second action `5`; the closed slot has no first action `7`.\n\n## Call routing\n\n```mermaid\nflowchart TD\n    call[\"Incoming call\"] --> initial[\"initial.ring_duration + initial.message\"]\n    initial --> hours{\"Open hours?\"}\n    hours -- \"open\" --> menu[\"open.message, open.pause\"]\n    menu -- \"digit 0-9 pressed\" --> actions[\"open.actions[digit]: action_1 (+ chained action_2)\"]\n    menu -- \"no key pressed\" --> fall[\"open.fall_through\"]\n    hours -- \"closed or holiday\" --> close[\"close.actions\"]\n    close -- \"action_1.id 1 (play message)\" --> event[\"close.on_event_actions on keypress\"]\n    actions --> terminal[\"Terminal action: hang up, dial extension/queue, voicemail, forward, another IVR, add tag, send message\"]\n    fall --> terminal\n    close --> terminal\n    event --> terminal\n```\n\n## Roles and access\n\n- Account admin only (`403` otherwise).\n\n## Pitfalls\n\n- Full replacement: leave out `name` and the IVR is renamed to an empty string; a digit whose two actions are both `0` is removed; with `options_msg_enabled: false` the digits 0\u20139 are left as they were.\n- Validation checks every `id` against the allowed list but not the chaining rules: an unchainable pair such as `4` followed by `0` fails with `500`, not `422`.\n- References are not checked to exist. A wrong slot, extension, queue number or template id only shows up when a caller reaches it.\n- `open.actions` must be a list of exactly ten entries for digits 0\u20139. An object keyed 1\u201310 passes the size check and then fails.\n- `{id}` accepts 1\u2013127 and creates the configuration row when it is missing, but IVRs themselves are only created through V1 (ids 1\u201331). Use ids you got from the list.\n- `initial.message` and `open.message` are integers 10\u201399; an empty string is treated as \"no message\"."
        },
        {
            "name": "Holiday Settings",
            "description": "Holiday settings tell an IVR what to do with a call on a day the business is closed. Each IVR can have one **public holiday** rule, applied on every national holiday of the country chosen for that IVR, and any number of **custom** rules, each a single from\u2013to period in the IVR's own timezone. This group holds the public holiday calendar (by country, or grouped by IVR), the public holiday rule (list, update, clear) and the custom rules (list, update, delete, clear). The IVR itself, including the out-of-hours actions a holiday rule can hand the call to, is configured in [IVR](/v2/docs/groups/ivr).\n\n## Workflow (what the portal does)\n\n1. **IVRs and their public holiday rule**: [`GET /v2/ivr/public_holiday_settings`](/v2/ref#/operations/publicHolidaySettings.index) answers an object keyed by IVR id. Each entry has `ivr` (`id`, `name`, `pub_holiday_country`) and `action`: the rule's `id`, `menu_id`, `first_action`, `first_action_data`, `second_action` and `second_action_data`, or only `menu_id` with `first_action` and `first_action_data` set to `null` when the IVR has no rule.\n2. **The calendar**: [`GET /v2/public_holidays/{countryCode}`](/v2/ref#/operations/publicHolidays.index) lists the upcoming national holidays of a country (ISO 3166-1 alpha-2, upper case; `GB` also returns the rows filed under `UK`), oldest first: `id`, `calendar_date` (`Y-m-d H:i:s`, at midnight), `country`, `menu_time_zone`, `holiday_name`, `holiday_description` and `holiday_type` (always `National holiday`). [`GET /v2/public_holidays_by_ivr`](/v2/ref#/operations/publicHolidays.byIvr) answers the same rows grouped by IVR id, for the country each IVR is set to, past dates included; an IVR without a country gets `[]`.\n3. **Set the public holiday rule**: [`PATCH /v2/ivr/public_holiday_settings`](/v2/ref#/operations/publicHolidaySettings.update) with one JSON object: `menu_id` (the IVR id), `first_action`, the optional `first_action_data`, `second_action` and `second_action_data`, and `pub_holiday_country` to set or change the IVR's country in the same call. Send the rule's `id` from step 1 when the IVR already has one. Answers `204`.\n4. **Custom rules**: [`GET /v2/ivr/custom_holiday_settings`](/v2/ref#/operations/customHolidaySettings.index) answers an object keyed by IVR id with `ivr` (`id`, `name`, `time_zone`) and `rules`, each with `id`, `menu_id`, `from_time`, `to_time`, the four action fields and `time_zone`.\n5. **Add or change custom rules**: [`PATCH /v2/ivr/custom_holiday_settings`](/v2/ref#/operations/customHolidaySettings.update) with a JSON **array** of rules, each with `menu_id`, `from_time`, `to_time`, `menu_time_zone` (an IANA name such as `Europe/Dublin`), `first_action` and the optional `first_action_data`, `second_action` and `second_action_data`. Add `id` to change an existing rule, leave it out to add one. Rules are saved one by one, in the order sent. Answers `204`.\n6. **Remove rules**: [`DELETE /v2/ivr/custom_holiday_settings/{id}`](/v2/ref#/operations/customHolidaySettings.remove) deletes one custom rule (`404` when it is not one of the account's); [`DELETE /v2/ivr/{ivrId}/custom_holiday_settings`](/v2/ref#/operations/customHolidaySettings.clearByIvr) deletes every custom rule of an IVR; [`DELETE /v2/ivr/{ivrId}/public_holiday_settings`](/v2/ref#/operations/publicHolidaySettings.clearByIvr) deletes the IVR's public holiday rule and leaves `pub_holiday_country` as it is. All answer `204`, also when there was nothing to delete.\n\n```bash\n# Irish public holidays on IVR 1: play announcement slot 12, then hang up\ncurl -X PATCH https://api.api-nuacom.com/v2/ivr/public_holiday_settings \\\n  -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"menu_id\": 1, \"pub_holiday_country\": \"IE\", \"first_action\": 1, \"first_action_data\": \"12\", \"second_action\": 0, \"second_action_data\": null}'\n# \u2192 204\n\n# Closed from Christmas Eve lunchtime to the end of St Stephen's Day: out-of-hours routing\ncurl -X PATCH https://api.api-nuacom.com/v2/ivr/custom_holiday_settings \\\n  -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '[{\"menu_id\": 1, \"from_time\": \"2026-12-24 13:00:00\", \"to_time\": \"2026-12-26 23:59:59\", \"menu_time_zone\": \"Europe/Dublin\", \"first_action\": 0, \"first_action_data\": null, \"second_action\": null, \"second_action_data\": null}]'\n# \u2192 204\n```\n\nThe custom rule then reads back like this (ISO contract; Dublin is `+00:00` in December):\n\n```json\n{\n  \"1\": {\n    \"ivr\": {\"id\": 1, \"name\": \"Main Call Flow\", \"time_zone\": \"Europe/Dublin\"},\n    \"rules\": [\n      {\"id\": 57, \"menu_id\": 1, \"from_time\": \"2026-12-24T13:00:00+00:00\", \"to_time\": \"2026-12-26T23:59:59+00:00\", \"first_action\": 0, \"first_action_data\": null, \"second_action\": null, \"second_action_data\": null, \"time_zone\": \"Europe/Dublin\"}\n    ]\n  }\n}\n```\n\n## Actions\n\nOn a day the public holiday rule matches, or during the period of a custom rule, the IVR runs the rule's actions instead of its open-hours flow: `first_action` with `first_action_data`, then `second_action` with `second_action_data` where the first action chains. The ids and the data are the IVR's own action vocabulary (see Actions in [IVR](/v2/docs/groups/ivr)); the data is a string of at most 50 characters.\n\n| `first_action` | What happens | `first_action_data` |\n|---|---|---|\n| `0` | Go to out of hours: the call takes the IVR's closed-hours actions | \u2013 |\n| `1` | Play a message | announcement slot 10\u201399, uploaded with [`POST /v2/announcements/upload-audio`](/v2/ref#/operations/announcements.uploadAudio) |\n| `2` | Dial an extension | extension number, from [`GET /v2/extensions`](/v2/ref#/operations/extensions.index) |\n| `3` | Join a queue | queue number (not the queue id), from [`GET /v2/queues`](/v2/ref#/operations/queues.index) |\n| `4` | Play a prompt, then dial the number the caller enters | announcement slot |\n| `6` | Go to voicemail | mailbox number, from [`GET /v2/voicemail/mailbox_numbers`](/v2/ref#/operations/voicemail.mailboxNumbers) |\n| `8` | Forward to a number | phone number |\n| `9` | Go to another IVR | IVR id |\n| `13` | Add a call tag | tag ids, comma-separated, from [`GET /v3/call-tags`](/v2/ref#/operations/v3.call-tags.index) |\n\n`second_action`: `0` none (hang up), `1` dial an extension, `2` join a queue, `4` dial the number the caller entered, `5` fall through (the IVR's no-key action), `6` voicemail, `8` forward to a number, `9` go to another IVR; `second_action_data` carries the matching value. The portal offers a second action after `1`, `3` and `13` (any of them except `4`) and after `4` (only `4`); after every other first action it sends `second_action` as `null`.\n\n## How a holiday rule overrides the IVR\n\n```mermaid\nflowchart TD\n    call[\"Call arrives at the IVR\"] --> match{\"Does today match a public holiday<br/>(IVR's country) or a custom from_time/to_time period?\"}\n    match -- \"yes\" --> rule[\"Run the matching rule's first_action / first_action_data,<br/>then second_action / second_action_data\"]\n    match -- \"no\" --> normal[\"IVR's normal open.actions flow\"]\n    rule -- \"first_action 0 (go to out of hours)\" --> closed[\"IVR's close.actions\"]\n```\n\n## Dates and timezones\n\n- A custom rule is one period, `from_time` to `to_time`, read as wall-clock times in `menu_time_zone`. Send `Y-m-d H:i:s`; a bare `Y-m-d` means midnight, so a one-day closure is `2026-12-25 00:00:00` to `2026-12-25 23:59:59`. Other date-time spellings are parsed, but an offset in the value is dropped rather than applied, and `X-Timezone` plays no part.\n- There is no recurrence: a custom rule covers its dates once, so a closure that repeats every year needs a new rule each year. Public holidays recur on their own: the public holiday rule applies to every national holiday in the calendar of the IVR's country, and the API has no way to leave individual days out.\n- In the custom list, `from_time` and `to_time` follow the account's date contract (see [Dates and timezones](/v2/docs/dates-and-timezones)). On the legacy contract they are `2026-12-24T13:00:00.000000Z`: the wall-clock time with a `Z` that does not mean UTC. On the ISO contract they are `2026-12-24T13:00:00+00:00`, with the offset of the IVR's timezone, never the one in `X-Timezone`. `calendar_date` on the calendar endpoints is `Y-m-d H:i:s` at midnight on both contracts.\n- `ivr.time_zone` in the custom list is the timezone of the IVR's first rule, or the account's timezone when the IVR has no rule. [`GET /v3/time-zones`](/v2/ref#/operations/v3.getTimezones) lists the IANA names.\n\n## Roles and access\n\n- Reading, that is both settings lists and both calendar endpoints, is open to any authenticated user of the account. Every `PATCH` and `DELETE` needs an account admin; any other user gets `403` with the body `\"Forbidden\"`.\n- The ISO dates option only changes the format of `from_time` and `to_time`.\n\n## Pitfalls\n\n- The settings lists and the by-IVR calendar are JSON objects keyed by IVR id; an account without IVRs gets `[]`.\n- Send `id` when changing the public holiday rule. A `PATCH` without `id` always inserts, and the list shows only the first rule of each IVR, so the extra row is invisible; `DELETE /v2/ivr/{ivrId}/public_holiday_settings` removes them all.\n- An `id` that is not one of the account's rules answers `500` on the public holiday `PATCH` and `404` on the custom `PATCH`; in the custom case the rules before it in the array are already saved, as there is no transaction.\n- `menu_id` must be one of the account's IVRs (`422` otherwise), but action ids and data are stored as sent: a wrong id, slot, extension or queue number only shows when a call reaches the rule.\n- `menu_time_zone` is required but not checked against the IANA list. An invalid name is stored, and on the ISO contract the custom list then fails.\n- `from_time` and `to_time` are not compared with each other or with other rules: a period that ends before it starts, or overlaps another rule, is accepted.\n- `pub_holiday_country` cannot be emptied: `null` or `\"\"` is ignored. To stop public holiday routing on an IVR, clear its rule.\n- `GET /v2/public_holidays/{countryCode}` lists dates from the current moment, so today's holiday has already dropped off it; `GET /v2/public_holidays_by_ivr` includes past dates. Both list national holidays only, and an unknown country answers `[]`.\n- `GB` is merged with `UK` on the country endpoint only; an IVR's `pub_holiday_country` must be exactly the `country` its calendar rows carry."
        },
        {
            "name": "Announcements"
        },
        {
            "name": "Softphone Announcements",
            "description": "Softphone announcements are audio clips an agent can play into a live call from the NUACOM softphone. Each one has a `name`, a `description`, one audio file (MP3, WAV or OGG) and a `duration`. This group holds the list, one announcement, create, update (JSON on `PUT`, multipart on `POST`), delete and the audio download. They are not the announcements IVRs and queues play: those are announcement slots uploaded with [`POST /v2/announcements/upload-audio`](/v2/ref#/operations/announcements.uploadAudio) and described in [IVR](/v2/docs/groups/ivr).\n\n## Workflow (what the portal does)\n\n1. **List**: [`GET /v2/softphone-announcements`](/v2/ref#/operations/softphone-announcements.index) answers every announcement of the account as an array of `{id, account_id, name, description, filename, size, duration}`; no paging and no filters. `size` is in bytes; `filename` is the storage name the API generated, not the name you uploaded.\n2. **Create**: [`POST /v2/softphone-announcements`](/v2/ref#/operations/softphone-announcements.store) as `multipart/form-data` with `name` (1\u201325 characters), `description` (up to 150 characters, optional), the audio as `file` (MP3, WAV or OGG) or as `base64_file` (a data URI, see below), and `duration`, the clip length in seconds, required whenever audio is sent. Answers `201` with the announcement. An account holds at most 100 announcements.\n3. **Edit the text**: [`PUT /v2/softphone-announcements/{id}`](/v2/ref#/operations/softphone-announcements.update) with a JSON body carrying any of `name`, `description` and `duration`; keys you leave out keep their value. Answers `204`, or `404` when the id is not one of the account's.\n4. **Replace the audio**: a file travels as `multipart/form-data`, which PHP does not read on `PUT`, so the portal sends it with [`POST /v2/softphone-announcements/{id}`](/v2/ref#/operations/softphone-announcements.updateWithAudio): `file` plus `duration`, and optionally `name` and `description`. It is the same operation as the `PUT`, which can replace the audio too, through `base64_file` in the JSON body. The previous file is deleted. Answers `204`.\n5. **Play or download**: [`GET /v2/softphone-announcements/{id}/audio`](/v2/ref#/operations/v2.softphoneAnnouncementAudio) answers the audio bytes with `Content-Type`, `Content-Length` and `Content-Disposition: attachment; filename=\"\u2026\"`; `404` when the announcement, or its file, does not exist. [`GET /v2/softphone-announcements/{id}`](/v2/ref#/operations/softphone-announcements.show) answers the record alone.\n6. **Delete**: [`DELETE /v2/softphone-announcements/{id}`](/v2/ref#/operations/softphone-announcements.destroy) removes the record and its file. `204`, or `404`.\n\nAfter a create or an update the account's connected softphones are notified of the change; the notification is best-effort and never fails the request.\n\n```bash\n# Create from an MP3 file\ncurl -X POST https://api.api-nuacom.com/v2/softphone-announcements \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -F 'name=Call recording notice' \\\n  -F 'description=Played before taking card details' \\\n  -F 'file=@recording-notice.mp3' \\\n  -F 'duration=12'\n# \u2192 201 {\"id\": 41, \"account_id\": \"IE-00123\", \"name\": \"Call recording notice\", \"description\": \"Played before taking card details\", \"filename\": \"IE-00123-6901a1b2c3d4e.mp3\", \"size\": 196608, \"duration\": 12}\n\n# Rename it\ncurl -X PUT https://api.api-nuacom.com/v2/softphone-announcements/41 \\\n  -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"name\": \"Recording notice\"}'\n# \u2192 204\n\n# Replace the audio: POST, not PUT\ncurl -X POST https://api.api-nuacom.com/v2/softphone-announcements/41 \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -F 'file=@recording-notice-v2.wav' -F 'duration=14'\n# \u2192 204\n\n# Download it\ncurl -o notice.wav https://api.api-nuacom.com/v2/softphone-announcements/41/audio \\\n  -H 'Authorization: Bearer YOUR_API_KEY'\n```\n\n## Audio formats and limits\n\n| Input | Accepted | Notes |\n|---|---|---|\n| `file` (multipart) | MP3, WAV, OGG | Checked on the content, not on the file name; the stored name gets the extension the content implies |\n| `base64_file` | `data:audio/wav;base64,\u2026`, `data:audio/mpeg;base64,\u2026`, `data:audio/ogg;base64,\u2026` | The declared type must match the content (`audio/x-wav` and the other `x-` spellings count as the same type); anything that looks like a URL or a file path is rejected; the stored file is always named `.wav` |\n\n- `name`: 1\u201325 characters. `description`: up to 150 characters; stored as `\"\"` when left out on create.\n- `duration`: a number, required whenever `file` or `base64_file` is sent; the API stores and returns it as a whole number and does not check it against the audio.\n- No maximum file size is validated by the API.\n- At most 100 announcements per account.\n\n## Roles and access\n\n- Every endpoint in this group is open to any authenticated user of the account; none requires an account admin.\n\n## Pitfalls\n\n- `GET /v2/softphone-announcements/{id}` answers `200` with `{}` for an id that is not one of the account's; the update, delete and audio endpoints answer `404`.\n- The 101st announcement is refused with `500`, not `422`.\n- A multipart body on `PUT` is ignored: the request answers `204` and changes nothing. Send files with `POST /v2/softphone-announcements/{id}`.\n- `duration` is required with `file` and `base64_file` (`422` otherwise), on an update as well as on create.\n- When both `file` and `base64_file` are sent, `file` is used.\n- A base64 upload is stored as `.wav` whatever audio type the data URI declares; prefer multipart for MP3 and OGG.\n- Deleting does not notify the softphones; creating and updating do.\n- The download is served as an attachment under the stored file name, not the one you uploaded."
        },
        {
            "name": "Queues",
            "description": "A queue holds inbound calls and rings its agents \u2014 extensions, each with a priority and an order \u2014 by a ring strategy until one answers or the timeout action fires. This group lists the account's queues ([`GET /v2/queues`](/v2/ref#/operations/queues.index), [`GET /v3/queues`](/v2/ref#/operations/v3.queues.index)), adds and removes agents, and reports on dynamic agents and on today's outbound activity. Queues themselves are created, configured and deleted in the portal. Logging a dynamic agent in or out is [`POST /v2/extensions/set-dynamic-agent-queue-status`](/v2/ref#/operations/extensions.updateDynamicAgentQueueStatus) in the [Extensions](/v2/docs/groups/extensions) group, and routing an IVR key to a queue is described in [IVR](/v2/docs/groups/ivr).\n\n## Workflow (what the portal does)\n\n1. **List**: [`GET /v3/queues`](/v2/ref#/operations/v3.queues.index) answers a plain array of `{\"id\", \"name\", \"number\", \"description\"}` ordered by number \u2014 enough for pickers. [`GET /v2/queues`](/v2/ref#/operations/queues.index) returns the same queues in full: `agents` (the member count), `agents_description` (one entry per member: `extension`, `name`, `priority`, `order`, `is_dynamic`), `queue_config` and `can_delete`. With `basic=true` it answers only `queue_id`, `queue_number`, `queue_name` and `queue_desc`.\n2. **Agents**: [`POST /v2/account-queue-headset`](/v2/ref#/operations/account-queue-headset.store) with `queue_number`, `extension_number` and optional `priority` (0\u201359, default 0), `order` (0 or more, default 0) and `is_dynamic` (boolean, default `false`) adds the extension to the queue, or updates those three settings when it is already a member, and answers `202` with the membership row `{\"account_id\", \"queue_id\", \"extension_number\", \"priority\", \"order\", \"is_dynamic\"}`. [`DELETE /v2/account-queue-headset/{account_queue_headset}`](/v2/ref#/operations/account-queue-headset.destroy) with `queue_number` and `extension_number` in the query string removes it (`204`). [`GET /v2/account-queue-headset`](/v2/ref#/operations/account-queue-headset.index) lists the memberships of the **caller's own** extension, each with its `queue` (`name`, `number`, `description`); it answers `400` when the caller has no extension in the account.\n3. **Dynamic agents**: a member with `is_dynamic` is a dynamic agent \u2014 one who logs in to and out of the queue instead of being rung permanently. [`POST /v2/extensions/set-dynamic-agent-queue-status`](/v2/ref#/operations/extensions.updateDynamicAgentQueueStatus) with `queue` (queue number), `extension` (extension number) and `action` (`login` or `logoff`) changes that state. It answers `200` with `{\"status\": \"success\", \"message\": \"Agent login\"}`, or `200` with `{\"error\": true, \"message\": \"Agent was not changed\", \"description\": \"\u2026\"}` when the change could not be applied.\n4. **Dynamic-agent reports**:\n   - [`GET /v2/queue-dynamic-agents`](/v2/ref#/operations/v2.getQueueDynamicAgents) is the login/logoff log, paginated. `page` and `perPage` (`15`, `25`, `50` or `100`) are required; `sort` takes `id`, `ext`, `queue`, `action`, `user_name`, `platform` or `date`, with a `-` prefix for descending (`-date` by default); the filters are `filter[ext]`, `filter[queue]` (queue number), `filter[action]` (`1` login, `0` logoff), `filter[user_name]`, `filter[platform]` (`1` Wallboard, `2` Apps, `3` Shortcode) and `filter[date]` as two Unix timestamps `from-to`. Each row is `id`, `date`, `account`, `ext`, `queue`, `action`, `user_id`, `user_name`, `platform` and `platform_name`; next to `data`, `links` and `meta` the response adds `agents` (extension number \u2192 extension name) and `queues` (the queue numbers that appear in the log).\n   - [`GET /v2/queue-dynamic-agents/status`](/v2/ref#/operations/v2.getQueueStatus) is the current state: for every extension-and-queue pair whose latest event is a login, that event, newest first \u2014 who is logged in where right now.\n6. **Related endpoints in other groups**: [`GET /v2/reports/queue-skipped-calls`](/v2/ref#/operations/v2.getQueueSkippedCalls) (Reports) lists the calls an agent did not pick up in a `queue` between `from` and `to`, optionally for one `agent` extension; [`GET /v2/call-log-queues`](/v2/ref#/operations/callLog.callLogAllowedQueues) (Call Logs) lists the queues the caller may filter call logs by, keyed by queue number.\n\n## Reading a queue\n\n`queue_config` in `GET /v2/queues` is the queue's behaviour:\n\n- `ring_strategy`: `ringall`, `leastrecent`, `fewestcalls`, `random`, `rrmemory`, `linear` or `wrandom`; `ring_agent_timeout` is the seconds each agent rings before the next one is tried, `ring_in_use` whether an agent already on a call is rung, `wrap_up_time` the seconds an agent is left alone after a call.\n- `timeout_in` is the seconds a caller waits before `timeout_action` fires: `0` ring an outside number, `1` continue, `2` backup call, `3` hang up, `4` option call, `5` option to voicemail, `6` dial an extension or shortcode, `7` voicemail, `8` another queue, `9` an IVR. `timeout_action_value` is the target (a number, extension, mailbox, queue id or IVR id); `backup_type` and `backup_value` describe the backup call.\n- `callee_announcement`, `periodic_announcement`, `announce_position` and `announce_position_frequency` are the caller-side announcements, `moh_class` the music on hold, `show_queue_name` whether the queue description is prepended to the caller ID the agent sees.\n- `can_delete` is `{\"allowed\": true}` when nothing points at the queue; otherwise `message` lists the numbers, IVRs, queues, callback widgets, webhooks and after-call-work rules that still use it. Deleting is portal-only.\n\n## Numbers and ids\n\nEvery queue has two identifiers: an **id** (`id` / `queue_id`), unique across NUACOM, and a **number** (`number` / `queue_number`), short and unique within the account. Every input in the API takes the number: `queue_number` in the agent endpoints, `queue` in the dynamic-agent status endpoint and the skipped-calls report, `filter[queue]` in the log, the `queues` filter of the call log, the `queues` grant in a user's permissions and the \"join queue\" actions of an IVR (see [IVR](/v2/docs/groups/ivr)). The id is only returned, never required.\n\nA queue also has two labels, a short **name** (`sales`) and a **description** (`Sales Queue`), and the key that carries each differs by endpoint:\n\n| Endpoint | id | number | short name | description |\n|---|---|---|---|---|\n| `GET /v3/queues` | `id` | `number` | `name` | `description` |\n| `GET /v2/queues` | `id` (string) | `number` (string) | \u2014 | `name` |\n| `GET /v2/queues?basic=true` | `queue_id` | `queue_number` | `queue_name` | `queue_desc` |\n| `GET /v2/account-queue-headset`, `queue` object | \u2013 | `number` | `name` | `description` |\n| `GET /v2/call-log-queues` | \u2013 | `number` | `id` | `name` |\n\n## Roles and access\n\n- Listing queues and the three reports are open to any authenticated user. An account admin sees every queue; a regular user sees only the queues in the `queues` grant of their permissions (set by an admin in the portal's Users screen, see [Users](/v2/docs/groups/users)), and with no grant both lists are empty \u2014 `[]`, not `403` \u2014 even when the user has full call-log access. The reports are not filtered: they cover the whole account.\n- Adding and removing agents requires an account admin (`403` otherwise).\n- Logging a dynamic agent in or out: an admin for any extension, a regular user for their own extension only (`403` otherwise).\n- The ISO dates option does not change this group: `date` in the dynamic-agent reports is always `M j Y H:i:s` (`Jun 15 2020 10:37:51`) in the caller's profile timezone, and `X-Timezone` is ignored there.\n\n## Pitfalls\n\n- `name` is the description in `GET /v2/queues` and the short name in `GET /v3/queues` (table above). Key your data on `number` or `id`, never on a label.\n- `/v2/queues` returns `id`, `number`, `agents` and every `queue_config` value as strings (`\"600\"`); `/v3/queues` returns integers. `is_dynamic` is `0`/`1` in `agents_description` and `true`/`false` in the agent endpoints, and `agents_description[].id` just repeats `extension`.\n- `POST /v2/account-queue-headset` answers `202` whether it created the membership or updated an existing one, and re-posting overwrites `priority`, `order` and `is_dynamic`, which reset to `0`/`false` when omitted.\n- `extension_number` must be an extension linked to a user; an existing but unlinked extension is rejected with `422`.\n- The `{account_queue_headset}` path segment of the `DELETE` is ignored \u2014 any value works \u2014 and the parameters go in the query string, not the body.\n- `perPage=-1` (\"all\") passes validation on the dynamic-agent log but the query then fails with `500`; page with `100` instead.\n- `filter[date]` takes Unix timestamps (`1735689600-1738368000`) while `date` in the rows is formatted text; convert before comparing. `action` is `login`/`logoff` on input and `1`/`0` in the reports.\n- When a queue is in use, `can_delete` is `{\"success\": false, \" allowed\": false, \"message\": [...]}` \u2014 the key carries a leading space \u2014 so test for `allowed === true` rather than for `allowed === false`."
        },
        {
            "name": "Speed Dial"
        },
        {
            "name": "Call Logs",
            "description": "Call logs are the account's call history: one row per call leg with direction, numbers, extensions, queue, duration, cost, whether a recording exists, and the notes and tags attached to it. This group is the list itself; recordings, notes, tags and reports have their own groups and are described here because the portal always uses them together.\n\n## Workflow (what the portal does)\n\n1. **The list**: [`GET /v2/call-log`](/v2/ref#/operations/callLog.callLog) is the call history grid. Filters (all optional, comma-separated where several values are allowed):\n   - `from_date` / `to_date` as `Y-m-d` or `Y-m-d H:i:s`, read in the `X-Timezone` you send (or the user's profile timezone). Send **both**; with only one, the last month is used.\n   - `type`: `incoming`, `outgoing`, `missed`, `unanswered`, plus `include_voicemail`, `include_playback`, `include_internal`, `group_missed_calls`.\n   - `numbers`, `incoming_number`, `outgoing_number`, `extensions`, `queues`, `tags` (tag ids), `notes` (substring), `search_for` (contact or extension name, or a number), `duration_above` / `duration_under`, `billsec_above` / `billsec_under` (seconds), `has_transcriptions`, `transcription`.\n   - `page`, `per_page` (default 25, no maximum), `sort_by` (`call_date`, `from`, `from_ext`, `to`, `to_ext`), `sort_dir` (`DESC` by default).\n   - The response is `{\"_embedded\": [rows], \"_links\": {\u2026}, \"page_count\": <current page>, \"page_size\", \"total_items\"}`. Lists of selectable extensions, numbers and queues for the user come with it in `_selectable`.\n2. **One call**: [`GET /v2/call-logs/{callId}`](/v2/ref#/operations/v2.getCallLogUnique) by `call_id` (or `call_unique_id`) returns the legs of that call as an array.\n3. **Recording**: build the URL yourself from the row, [`GET /v3/call-recording/{callId}`](/v2/ref#/operations/v3.callRecording) with the row's `call_id`; `format` picks MP3 (default), OGG or WAV, `start`/`end` trim it. Deleting is admin-only: [`DELETE /v2/call-recording/{callUniqueId}`](/v2/ref#/operations/call_recording.destroy).\n4. **Notes and tags on a call**: read them with [`GET /v2/call-notes?callIDs[]=\u2026`](/v2/ref#/operations/callLog.callNotes) and [`GET /v2/call-tags?callIDs[]=\u2026`](/v2/ref#/operations/callLog.callTags), passing the row's `call_id`, `sip_call_id` and `original_sip_call_id` together. Add a note with [`POST /v3/call-notes`](/v2/ref#/operations/v3.call-notes.store) (`callId`, `note`), assign a tag with [`POST /v2/add-call-tag`](/v2/ref#/operations/v2.addCallTag) (`call_id`, `tag_info_id`); the tag catalogue is [`GET /v3/call-tags`](/v2/ref#/operations/v3.call-tags.index).\n5. **Transcript**: [`GET /v2/speech-to-text/{callUniqueId}`](/v2/ref#/operations/speechToText.getCallSTT) when the account has transcription enabled.\n6. **Export**: [`GET /v2/call-log-export`](/v2/ref#/operations/callLog.callLogExport) takes the same filters as the list and answers `204`: the CSV is built in the background and emailed to the requesting user, normally within minutes. The job is allowed 15 minutes; past that it is abandoned, not retried, and the user receives a failure email instead, so request again with a narrower range. An export holds at most 100,000 rows: above that the request answers `422` with the row count and the limit in `message`, and nothing is queued. The six-month limit on the date range is a portal rule, not an API one. Dates in the file are in the `X-Timezone` you send, or the user's profile timezone without it.\n7. **Reports** (their own group): [missed calls](/v2/ref#/operations/callLog.missedCalls) (paginated, with [an export](/v2/ref#/operations/callLog.missedCallsExport)), [top callers](/v2/ref#/operations/callLog.topCallers), [busy hours](/v2/ref#/operations/callLog.hourlyBusyHours) by hour, [day](/v2/ref#/operations/callLog.dailyBusyHours) or [month](/v2/ref#/operations/callLog.monthlyBusyHours), and extension usage by [direction](/v2/ref#/operations/callLog.directionExtensionUsage) or [duration](/v2/ref#/operations/callLog.durationExtensionUsage). All take `from_date`, `to_date` and, where it applies, `extensions` or `type`.\n\n## Reading a row\n\n- `call_unique_id` is the row's own id; `call_id` is the telephony id shared by every leg of the same call (transfers, queue legs). Key your data on `call_unique_id`, look recordings up by `call_id`.\n- `direction` is `inbound`, `outbound` or `internal`; `type` adds `missed`, `unanswered`, `voicemail`, `playback`; `status` is `ANSWERED`, `NO ANSWER`, `BUSY` or `FAILED`.\n- Who is who depends on `direction`. Every number comes twice, `from` / `to` as stored and `from_local` / `to_local` in local format; pick one and show it consistently.\n  - **inbound**: the caller is `from` (or `from_local`), named by `from_name` (`from_contact_id` is the matched phonebook contact, `from_name_source` says where the name came from); the number they dialled is `to` (or `to_local`) with `to_name`; the extension that took the call is `to_ext` with `to_ext_name`. On a missed call `to_ext` is empty.\n  - **outbound**: the agent is `from_ext` with `from_ext_name`; the caller ID presented to the other side is `from` (or `from_local`) with `from_name`; the person called is `to` (or `to_local`) with `to_name` (`to_contact_id`).\n  - **internal**: both sides are extensions, `from_ext` / `from_ext_name` and `to_ext` / `to_ext_name`.\n  - For one user, a row whose `from_ext` is their extension is a call they made and a row whose `to_ext` is their extension is a call they received.\n- `billsec` is the connected time, `duration` the total time including ringing.\n- `recording` is `true` only when a recording exists **and** the user may listen to it.\n- `extra.call_tags` and `extra.call_notes` are included in the row; `transferred_child` lists the ids of the legs a transfer created (fetch them with `cdr_id=<ids>`).\n\n## Roles and access\n\n- Any authenticated user. An account admin, or a user whose call-log permission is \"all\", sees every call; everyone else sees only calls on their own extension and on the numbers, extensions and queues granted to them. With no grants the list is simply empty, not `403`.\n- Recording playback needs the same visibility and recording access (the account's recording add-on or subscription); otherwise `403`.\n- Deleting a recording and the admin missed-call export are admin-only.\n- The ISO dates option (per account) switches `call_date` and note timestamps to ISO 8601 in the requested timezone (UTC by default). Without it dates are `Y-m-d H:i:s` in the user's timezone.\n\n## Pitfalls\n\n- The generated reference does not list the list's filters, because they are read from the raw query string. Use the parameters described above.\n- `call_id` is **not unique**: transfer and queue legs share it. Use `call_unique_id` as the row key, and pass all three ids when reading notes and tags.\n- `page_count` is the current page, not the number of pages; paginate on `total_items` and `page_size`.\n- Choosing a direction in `type` excludes voicemail and playback rows unless you add `include_voicemail` / `include_playback`.\n- Send filters as comma-separated strings, not as `extensions[]` arrays.\n- Dates: an unparsable value silently becomes 1970-01-01; a value with a UTC offset is shifted. Send wall-clock times and set `X-Timezone`.\n- There is no server-side cap on the date range or `per_page`; the portals cap the range at six months. Recordings are kept for six months by default (longer with a retention add-on), so an older row with `recording: true` can still answer `404`.\n- Exports are asynchronous and arrive by email; the request itself returns no job id."
        },
        {
            "name": "Call Recording",
            "description": "Call recordings are the audio files of recorded calls, kept per account and addressed by the call's `call_id`. This group holds the playback and download endpoint, the admin-only delete and the account's storage statistics. The call row that tells you a recording exists is in [Call Logs](/v2/docs/groups/call-logs); the transcript of a recording is in Speech To Text and follows the same access rule as playback.\n\n## Workflow (what the portal does)\n\n1. **Find the call**: the rows of [`GET /v2/call-log`](/v2/ref#/operations/callLog.callLog) carry `recording` (`true` when a file exists and the user may listen to it) and the call's ids. Use the row's `call_id`, the telephony id shared by the legs of one call, for everything in this group; `call_unique_id` is the row's own id and is not a recording id. [Call Logs](/v2/docs/groups/call-logs) explains how to read a row.\n2. **Play or download**: [`GET /v3/call-recording/{callId}`](/v2/ref#/operations/v3.callRecording) streams the file. `format` is `0` for MP3 (the default), `1` for OGG or `2` for WAV; `start` and `end` trim the audio and are positions in seconds with optional decimals (`90.5`). Send both or neither. The answer is the audio bytes with `Content-Disposition: attachment; filename=\u2026` and a `Content-Type` detected from the file. The endpoint supports HTTP range requests: a `Range: bytes=\u2026` header is answered with `206` and `Content-Range`, a range past the end of the file with `416`. Each playback is recorded in the account's recording access log (user, time and IP address).\n3. **Transcript**: [`GET /v2/speech-to-text/{callUniqueId}`](/v2/ref#/operations/speechToText.getCallSTT) takes the same `call_id` (its parameter is named `callUniqueId`, but it is this value) when the account has transcription enabled, and applies the access rule of playback.\n4. **Delete** (account admin): [`DELETE /v2/call-recording/{callUniqueId}`](/v2/ref#/operations/call_recording.destroy), again with the row's `call_id`. It removes the file and its transcript, sets the call row's `recording` to `false` and answers `204`, also when no recording exists for that id. There is no undo; the deletion is written to the access log.\n5. **Storage** (account admin): [`GET /v2/call-recording/statistics`](/v2/ref#/operations/call_recording.statistics) answers `used` (`value` in bytes, `formatted`, and `percentage` of the allowance as a string such as `\"6.84\"`), `allowed` (`value` in GB, `formatted` as `\"10 Gb\"`) and `oldest_file.date` (`null` when nothing is stored). The allowance is the recording storage of the account's subscriptions that include recording plus any storage add-ons; when it is `0`, `percentage` is `\"100\"`.\n\n```bash\n# The whole call as MP3, saved to disk\ncurl -o call.mp3 \\\n  'https://api.api-nuacom.com/v3/call-recording/1761640800.123' \\\n  -H 'Authorization: Bearer YOUR_API_KEY'\n\n# Seconds 30 to 90 only, as OGG\ncurl -o excerpt.ogg \\\n  'https://api.api-nuacom.com/v3/call-recording/1761640800.123?format=1&start=30&end=90' \\\n  -H 'Authorization: Bearer YOUR_API_KEY'\n```\n\n## Who can access a recording\n\n```mermaid\nflowchart TD\n    start{\"No Recordings add-on active?\"} -- \"yes\" --> denyAll[\"403 for everyone, admins included\"]\n    start -- \"no\" --> admin{\"Account admin?\"}\n    admin -- \"yes\" --> allow[\"Playback and transcript allowed\"]\n    admin -- \"no\" --> toggle{\"Call Recording Access toggle on?\"}\n    toggle -- \"no\" --> deny[\"403\"]\n    toggle -- \"yes\" --> access{\"Call-log access to this call?<br/>(all, own extension, or granted extension/queue/number)\"}\n    access -- \"yes\" --> allow\n    access -- \"no\" --> deny\n```\n\n## Roles and access\n\n- Playback and transcript: an **account admin** can play every recording of the account. Any other user needs the **Call Recording Access** toggle on their user profile (an account admin sets it in the portal's user settings) **and** access to the call through their call-log permissions: call-log access \"all\", or a call on their own extension or on an extension, queue or number granted to them. Otherwise the answer is `403`.\n- The **No Recordings** add-on, when active on the account, blocks playback and transcripts for everyone, admins included (`403`).\n- The `recording` flag on call rows is decided by a stricter test than playback: the Call Recording Access toggle must be on even for an admin, and a non-admin user also needs the account to hold the call recording add-on or a subscription that includes recording. An admin whose toggle is off therefore sees `recording: false` on rows they can still play.\n- Delete and statistics are **account admin** only; any other user gets `403` with the body `\"Forbidden\"`.\n- With the account's ISO dates option, `oldest_file.date` is ISO 8601 in the requested timezone (UTC by default); without it, it is `Y-m-d H:i:s` in Irish time.\n\n## Pitfalls\n\n- `format` on playback is a number (`0`, `1`, `2`); anything else answers `422`.\n- Trimming needs both `start` and `end`, as plain decimals (`90.5`, not `1:30`), with `end` after `start`.\n- A recording is prepared on demand: fetched from storage, decrypted and, for OGG, WAV or a trim, converted. The first request for a given file and format can take a few seconds; the prepared file is reused for about two minutes.\n- An id that is not a `call_id` (for example a `call_unique_id`) answers `404`; for a user with limited call-log access it answers `403` instead, because the visibility check runs first.\n- A row with `recording: true` can still answer `404`: recordings are kept for six months by default (longer with a retention add-on), and a deleted recording is gone at once.\n- `DELETE` answers `204` for an id that has no recording, so a mistyped id looks like success."
        },
        {
            "name": "Call Notes",
            "description": "Call notes are free-text remarks attached to a call, with the user who wrote them and when. A call can hold any number of notes; they appear in the call details, go to the account's connected CRM integrations and fire the `note_added` webhook. This group holds one reading endpoint and two identical ways of adding a note. Call rows carry their notes in `extra.call_notes` (see [Call Logs](/v2/docs/groups/call-logs)); rules that make a note mandatory after a call are in [After Call Work](/v2/docs/groups/after-call-work).\n\n## Workflow (what the portal does)\n\n1. **Read the notes of a call**: [`GET /v2/call-notes?callIDs[]=\u2026`](/v2/ref#/operations/callLog.callNotes). `callIDs` is an array (`callIDs[]=a&callIDs[]=b`) or one comma-separated string; pass the row's `call_id`, `sip_call_id` and `original_sip_call_id` together, because a note is stored under whichever of them was used to add it. The answer is an array, newest first, of `call_id` (the id the note was stored under), `note`, `account_id`, `user_id`, `user_name` (`null` when that user no longer exists) and `note_time` (ISO 8601, UTC). Ids of several calls can be mixed in one request; tell the notes apart by `call_id`. Without `callIDs` the endpoint answers `406` with the body `false`.\n2. **Add a note**: [`POST /v3/call-notes`](/v2/ref#/operations/v3.call-notes.store) with `callId` (a string of up to 100 characters: the row's `call_id`, `sip_call_id` or `original_sip_call_id`) and `note` (up to 1000 characters; HTML tags are stripped). Answers `204`. [`POST /v2/call-notes`](/v2/ref#/operations/v2.addCallNote) is the same operation under its older path; both stay available and behave identically.\n3. **What follows**: the note is stored with the calling user as its author, the account's CRM integrations receive the updated call, and a `note_added` webhook goes to the subscribed URLs (see [Integrations](/v2/docs/groups/integrations)).\n\n```bash\n# Add a note\ncurl -X POST https://api.api-nuacom.com/v3/call-notes \\\n  -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"callId\":\"1761640800.123\",\"note\":\"Customer asked for a quote by Friday\"}'\n# \u2192 204\n\n# Read the notes back; repeat callIDs[] for the row's sip_call_id and original_sip_call_id\ncurl 'https://api.api-nuacom.com/v2/call-notes?callIDs[]=1761640800.123' \\\n  -H 'Authorization: Bearer YOUR_API_KEY'\n# \u2192 [{\"call_id\":\"1761640800.123\",\"note\":\"Customer asked for a quote by Friday\",\"account_id\":\"IE-00123\",\"user_id\":123,\"user_name\":\"Jane\",\"note_time\":\"2026-10-28T09:15:00.000000Z\"}]\n```\n\n## Roles and access\n\n- Any authenticated user can read and add notes; nothing in this group is admin-only.\n- Notes are scoped to the account, not to the user's call-log permissions: `GET /v2/call-notes` answers the notes of any call of the account whose ids you pass, and `POST` accepts any call of the account. A call of another account, or an id that matches no call, is refused with `422` (\"The given call does not belong to this account.\").\n\n## Pitfalls\n\n- `callId` must be a JSON string: a bare number such as `1761640800.123` fails validation (`422`).\n- Store notes under the row's `call_id` when you can; whichever id you use, read them back with all three ids, as the portal does.\n- The missing-parameter answer of `GET /v2/call-notes` is `406`, not `422`, and its body is `false`.\n- The text is stored with its HTML tags removed, silently; it is not truncated: more than 1000 characters answers `422`.\n- Editing and deleting a note is not part of this group; the portal does both in the browser.\n- `note_time` is set by the server. In `GET /v2/call-notes` it is ISO 8601 in UTC; inside a call row (`extra.call_notes`) it follows the row's date format, which the account's ISO dates option decides.\n- `user_name` is the user behind the token. With an API key that is the admin who created the key, not your end user; put the author in the text when it matters."
        },
        {
            "name": "Call Tags",
            "description": "Call tags are labels an account defines once, in a catalogue, and then assigns to calls so that call history can be filtered and reported by outcome. The catalogue is a tree up to five levels deep: a tag has a name, a color, an availability (all calls, inbound only or outbound only), an optional parent and optional visibility rules that limit it to some extensions or departments. This group holds the catalogue endpoints under `/v3/call-tags`, the assignment endpoints `GET /v2/call-tags` and `POST /v2/add-call-tag`, and an older delete. Call rows carry their tags in `extra.call_tags` (see [Call Logs](/v2/docs/groups/call-logs)); rules that make tagging mandatory after a call are in [After Call Work](/v2/docs/groups/after-call-work).\n\n## Workflow (what the portal does)\n\n1. **Tag picker**: [`GET /v3/call-tags/all-parent-child`](/v2/ref#/operations/callTagInfo.allParentChild) answers every tag the user may see, parents and children alike, as one flat array in catalogue order; build the tree client-side on `parent_id`. `descendants_count` is always `0` on this endpoint.\n2. **Catalogue page**: [`GET /v3/call-tags`](/v2/ref#/operations/v3.call-tags.index) with `page` and `perPage` (both required; `perPage` is `15`, `25`, `50`, `100`, or `-1` for all) lists the top-level tags only, each with its `descendants_count` and `visibility` rules. Filters: `filter[name]` and `filter[color]` (partial match), `filter[available_for]` (`2` inbound or `3` outbound; tags available for all calls are always included). A paginated answer is `{\"data\": [tags], \"links\": {\u2026}, \"meta\": {\u2026}}` with `meta.total` and `meta.last_page`; `perPage=-1` answers a plain array.\n3. **One tag and its children**: [`GET /v3/call-tags/{callTag}`](/v2/ref#/operations/v3.call-tags.show) answers the tag with `descendants`, its direct children, each with their own `descendants_count`; `available_for` in the query limits the children the way the list filter does. Account admins also get the tag's `visibility`.\n4. **Create** (account admin): [`POST /v3/call-tags`](/v2/ref#/operations/v3.call-tags.store) with `name` (up to 20 characters), `color` (`#rgb` or `#rrggbb`; the key is required but may be `null`) and, optionally, `parent_id`, `available_for` (`1` all calls, the default; `2` inbound; `3` outbound), `visible_to` (a list of up to 100 entries, each `{\"type\": 1, \"allowed_id\": <extension number>}` or `{\"type\": 2, \"allowed_id\": <department id>}`) and `order_column` (the position in the catalogue, from `1`; `0` or omitted appends the tag at the end). Answers `201` with the tag.\n5. **Update** (account admin): [`PUT /v3/call-tags/{callTag}`](/v2/ref#/operations/v3.call-tags.update) with the same body. `name` and `color` are saved on every call; `parent_id`, `available_for`, `visible_to` and `order_column` change only when the key is present. `\"parent_id\": null` promotes a child to the top level, `\"visible_to\": []` (or `null`) removes every visibility rule, and an omitted `visible_to` keeps them. Answers `202` with the tag.\n6. **Assign to a call**: [`POST /v2/add-call-tag`](/v2/ref#/operations/v2.addCallTag) with `call_id` (the row's `call_id`, `sip_call_id` or `original_sip_call_id`, as a string) and `tag_info_id` (the catalogue `id`). Answers `204`; assigning a tag the call already has is a no-op. A new assignment is pushed to the account's CRM integrations and fires the `tag_added` webhook (see [Integrations](/v2/docs/groups/integrations)).\n7. **Read a call's tags**: [`GET /v2/call-tags?callIDs[]=\u2026`](/v2/ref#/operations/callLog.callTags) with the row's `call_id`, `sip_call_id` and `original_sip_call_id` (an array, or one comma-separated string). It answers the account's whole catalogue, parents and children, in id order, with the stored fields `id`, `tag_name`, `tag_color`, `parent_id`, `available_for`, `order_column`, plus `assigned` (`1` or `0`) for that call. Without `callIDs` it answers `406`.\n8. **Delete** (account admin): [`DELETE /v3/call-tags/{callTag}`](/v2/ref#/operations/v3.call-tags.destroy) removes the tag with its whole subtree, every assignment of those tags on calls and their CRM tag mappings (ActiveCampaign, HubSpot); it answers `204`, or `404` for a tag of another account. [`DELETE /v2/tags/{id}`](/v2/ref#/operations/tags.destroy) is the older form: it detaches the one tag from every call (one `tag_removed` webhook per call) and deletes it, without the subtree and CRM clean-up, so use it only for a tag that has no children.\n\n```bash\n# A catalogue tag for inbound calls, visible to extension 101 only\ncurl -X POST https://api.api-nuacom.com/v3/call-tags \\\n  -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"Callback\",\"color\":\"#ff5733\",\"available_for\":2,\"visible_to\":[{\"type\":1,\"allowed_id\":101}]}'\n# \u2192 201 {\"id\":42,\"name\":\"Callback\",\"color\":\"#ff5733\",\"available_for\":2,\"descendants_count\":0,\"visibility\":[{\"type\":1,\"allowed_id\":101}],\"order_column\":7,\"parent_id\":null}\n\n# Assign it to a call\ncurl -X POST https://api.api-nuacom.com/v2/add-call-tag \\\n  -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '{\"call_id\":\"1761640800.123\",\"tag_info_id\":42}'\n# \u2192 204\n```\n\n## Reading a tag\n\n| Field | Meaning |\n|---|---|\n| `id` | The catalogue id; it is the `tag_info_id` you assign with, and the `tags` filter value of the call-log list |\n| `name`, `color` | The label and its hex color (`tag_name`, `tag_color` on `GET /v2/call-tags`) |\n| `available_for` | `1` all calls, `2` inbound only, `3` outbound only |\n| `parent_id` | `null` for a top-level tag, otherwise the parent's `id` |\n| `order_column` | The position in the catalogue, from `1`; every list is sorted by it |\n| `descendants_count`, `descendants` | The number of direct children, and the children themselves where the endpoint loads them |\n| `visibility` | The visibility rules: `type` `1` with an extension number, or `2` with a department id. No rules means visible to everyone |\n\n## Roles and access\n\n- Reading the catalogue, reading a call's tags and assigning tags: any authenticated user. The `/v3/call-tags` reads hide restricted tags from non-admin users: a user sees the tags without visibility rules plus those whose rules name their extension or one of their departments, and `GET /v3/call-tags/{callTag}` answers `404` for a tag they may not see. `GET /v2/call-tags` applies no visibility filter. Account admins see every tag.\n- Creating, updating and deleting catalogue tags: **account admin** only. The `/v3/call-tags` writes answer `403` for any other user; `DELETE /v2/tags/{id}` answers `403` with the body `\"Forbidden\"`.\n\n## Pitfalls\n\n- Two different things are called \"call tags\": `GET /v3/call-tags` is the catalogue, `GET /v2/call-tags` is the assignment state of one call; `POST /v3/call-tags` creates a catalogue entry, `POST /v2/add-call-tag` assigns one. There is no `POST /v2/call-tags`: that path is redirected to the catalogue create, so a body meant for an assignment is validated as a new tag.\n- `GET /v2/call-tags` reads one call: it takes the first call that matches any id you pass and answers that call's assignments. Pass the three ids of one row, not the ids of several calls.\n- `tag_info_id` is not checked against the catalogue: an unknown id, or another account's, answers `204` and creates an assignment that `GET /v2/call-tags` never shows.\n- There is no endpoint to remove one tag from one call. The portal does that in the browser; through the API the only removals are the catalogue deletes, which detach the tag from every call.\n- `page` and `perPage` are required on `GET /v3/call-tags` (`422` without them); `sort` is accepted but ignored; an unknown `filter[...]` key answers `400`.\n- A tag can be at most five levels deep, cannot be its own parent and cannot be moved under one of its own descendants (`422`). `parent_id` must be a tag of the account.\n- A `visible_to` entry must name something the account owns, an extension number for `type` 1 or a department id for `type` 2 (`422`); a tag whose rules match nobody disappears for every non-admin user.\n- `name` over 20 characters, or a `color` that is not a hex code, answers `422`. Both are required on every `PUT`, not only on create.\n- `DELETE /v2/tags/{id}` answers `204` for an id that does not exist. `DELETE /v3/call-tags/{callTag}` sends no `tag_removed` webhook for the assignments it removes; only the v2 delete does."
        },
        {
            "name": "Call Rates",
            "description": "The rate card is the per-minute price list for outbound calls under the account's package: one price per destination network, by country. The group has two read-only endpoints, the countries the card covers and the rates of one of them, which together make the portal's **Billing \u2192 Call Rates** page. Messaging prices are a separate list, described in [Conversations](/v2/docs/groups/conversations).\n\n## Workflow (what the portal does)\n\n1. **Countries**: [`GET /v2/account/call-rates-countries`](/v2/ref#/operations/v2.getAccountCallRatesCountries) answers a bare array of `{\"country_code\": \"IE\", \"name\": \"Ireland\"}`: the countries with at least one rate in the account's card, in alphabetical order of name, with `XS` \"International Satellite\" last when the card prices satellite numbers. The portal fills its country picker from it.\n2. **Rates of a country**: [`GET /v2/account/call-rates?country_code=IE`](/v2/ref#/operations/v2.getAccountCallRates) answers `{\"currency\": \"EUR\", \"data\": [{\"network\": \"IRELAND EIR MOBILE\", \"number_type\": 1, \"rate\": 0.04215}, \u2026]}`: one row per network, number type and rate, sorted by network. `rate` is the price per minute before VAT in `currency`, the account's billing currency, with up to five decimals. `number_type` is `0` fixed line, `1` mobile, `3` toll-free, `4` premium or `99` undefined, for a range that mixes landlines and mobiles (the US and Canada) or that NUACOM has not classified.\n\n`country_code` is required: two letters in either case, one of the countries of [`GET /v3/country-list`](/v2/ref#/operations/v3.getCountries) or `XS`; anything else answers `422`.\n\n## Roles and access\n\n- Any authenticated user of the account; no admin check.\n\n## Pitfalls\n\n- The two answers have different shapes: the countries are a bare array, the rates an object with `data` and `currency`.\n- An account without a package has no rate card: both endpoints answer `200` with an empty list, as does a country with no rates. Neither is a `404`.\n- Rates are before VAT and come with up to five decimals; the portal rounds them to three.\n- A destination can appear more than once: a network priced differently for two number types, or at two rates, is two rows.\n- Networks whose name says \"mobile\" but whose numbers are classified as fixed, toll-free or premium are left out rather than shown under a misleading name."
        },
        {
            "name": "Callbacks",
            "description": "A callback is a call NUACOM places for you in two legs: the platform first rings one of the account's extensions or a queue and, once that leg is answered, dials the destination number and bridges the two. In the API it is a single operation, [`POST /v2/request-callback`](/v2/ref#/operations/v2.requestCallbackAction). The extension and queue numbers it starts from come from the [Extensions](/v2/docs/groups/extensions) and Queues groups.\n\n## Workflow (what the portal does)\n\n1. **Pick the origin**: an extension number from [`GET /v2/extensions`](/v2/ref#/operations/extensions.index) (`number`) or a queue number from [`GET /v2/queues`](/v2/ref#/operations/queues.index) (`number`, not the queue id).\n2. **Request the call**: `POST /v2/request-callback` with `method` (`extension` or `queue`), `from_number` (the extension or queue number, up to 20 characters) and `dst_number` (the destination in E.164, `+353861234567`, up to 20 characters). The answer is `200` with `{\"data\": true}` when the platform accepted the request and `{\"data\": false}` when it refused it.\n3. **What happens next**: with `extension`, the extension rings for up to 30 seconds showing the caller ID name `WebCall +353861234567` (the destination); when the agent answers, the destination is dialled from that extension and the two legs are bridged. With `queue`, the call is placed into the queue and offered to its agents under the same `WebCall` name, and the destination is dialled when an agent answers. If nobody answers within 30 seconds, nothing is dialled.\n4. **Afterwards**: the request returns nothing beyond `data`: no call id and no status to poll.\n\n```bash\ncurl -X POST https://api.api-nuacom.com/v2/request-callback \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"method\":\"extension\",\"from_number\":\"101\",\"dst_number\":\"+353861234567\"}'\n# \u2192 {\"data\":true}\n```\n\n## How a callback connects two legs\n\n```mermaid\nsequenceDiagram\n    participant I as Your integration\n    participant API as NUACOM API\n    participant Origin as Extension or queue (leg 1)\n    participant Dst as Destination number (leg 2)\n\n    I->>API: POST /v2/request-callback<br/>method, from_number, dst_number\n    API-->>I: 200 {data: true}\n    API->>Origin: Ring for up to 30 seconds<br/>caller ID \"WebCall <dst_number>\"\n    alt answered within 30 seconds\n        Origin-->>API: Answered\n        API->>Dst: Dial dst_number\n        Dst-->>API: Answered\n        Note over Origin,Dst: Two legs bridged\n    else nobody answers within 30 seconds\n        Note over API,Origin: Nothing is dialled\n    end\n```\n\n## Validation errors\n\nA rejected body answers `422` with the first error as `message` and every error under `errors`:\n\n```json\n{\n  \"message\": \"Extension is not available for input account id.\",\n  \"errors\": {\n    \"from_number\": [\"Extension is not available for input account id.\"]\n  },\n  \"trace\": null\n}\n```\n\n| Field | Error text | When |\n|---|---|---|\n| `method` | `The method field is required.` | Missing |\n| `method` | `The selected method is invalid.` | Not `extension` or `queue` |\n| `from_number` | `The from number field is required.` | Missing |\n| `from_number` | `Extension is not available for input account id.` | `method` is `extension` and the account has no extension with that number |\n| `from_number` | `Queue not available for account.` | `method` is `queue` and the account has no queue with that number |\n| `dst_number` | `The dst number field is required.` | Missing |\n| `dst_number` | `dst number has an invalid phone format` | Cannot be read as a phone number |\n| `dst_number` | `The dst number field must not be greater than 20 characters.` | Longer than 20 characters |\n\n## Roles and access\n\n- Any authenticated user; there is no admin gate. The call is placed on the account behind the token, from the extension or queue you name.\n- `500` means the telephony platform could not be reached; `{\"data\": false}` means it answered but did not place the call.\n\n## Pitfalls\n\n- `dst_number` is dialled exactly as you send it. The format check reads it in the user's country, so a national number such as `0861234567` can pass validation for an Irish user, but the platform still receives that string unchanged. Always send E.164.\n- For `queue`, `from_number` is the queue **number** (`number` in `GET /v2/queues`), not its id; the API resolves the id itself.\n- A refusal comes back as `200` with `{\"data\": false}`, not as an error status. Check the flag.\n- The first leg rings for 30 seconds at most; the limit is not configurable per request.\n- The API does not de-duplicate requests; each one is handed to the platform as a new call."
        },
        {
            "name": "After Call Work",
            "description": "After Call Work rules make tagging and note-taking mandatory in the NUACOM softphone. A rule matches calls by inbound number or by queue and sets what the agent must enter once the call ends: a minimum number of tags, a minimum number of words in the note, and a countdown timer that bounds how long the softphone waits for them. This group holds the rule list, the save (an upsert of the whole set), the delete, and the lookup phones use to find the rules for one call. The tags come from the [Call Tags](/v2/docs/groups/call-tags) catalogue, and the entries themselves are written with the [Call Notes](/v2/docs/groups/call-notes) and Call Tags endpoints.\n\n## Workflow (what the portal does)\n\n1. **List**: [`GET /v2/after-call-work`](/v2/ref#/operations/after-call-work.index) answers the account's rules, newest first, each with `id`, `account_id`, `direction` (`inbound`, `outbound` or `both`), `number` (a list of numbers, or `null`), `queue_id` (a list of queue ids, or `null`), `tags` (the minimum number of tags), `notes` (the minimum number of words in the note) and `timer` (seconds).\n2. **Save**: [`PUT /v2/after-call-work/upsert`](/v2/ref#/operations/v2.afterCallWorkUpsert) takes a JSON array of rules and inserts or updates each one by `id`; the portal sends every rule of its page on each save. A rule has `id` (`0` for a new rule), `direction`, either `number` (a list) or `queue_id` (a list), `tags`, `notes` and `timer` (at most `180` seconds). Send every key, with `null` or `[]` for the ones that do not apply. `tags` and `notes` are required when `timer` is `0`, and `timer` is required when `tags` or `notes` is `0`. A queue rule is stored as `inbound` whatever `direction` says. An `id` that is not `0` and not one of the account's rules fails the whole save with `422` and an error on `<index>.id`. Answers `204`; connected softphones are told to reload their rules.\n3. **Delete**: [`DELETE /v2/after-call-work/{id}`](/v2/ref#/operations/after-call-work.destroy) removes one rule and notifies the softphones. `204`, or `404` when the id is not one of the account's.\n4. **Lookup for one call**: [`GET /v2/after-call-work/settings`](/v2/ref#/operations/v2.afterCallWorkSettings) with `direction` (`inbound` or `outbound`) and either `number` or `queue_id` answers the rules that apply to such a call, as `[{\"id\", \"tags\", \"notes\", \"timer\"}]`: rules with that `direction` or `both` whose `number` list contains the number, or whose `queue_id` list contains the queue id. An empty array means nothing is mandatory. The number you send is normalised to `00` + country code + national number before matching (`+353 91 234 5678` becomes `00353912345678`), so store numbers in that form.\n\n```bash\n# One new rule for a number (both directions) and one updated queue rule\ncurl -X PUT https://api.api-nuacom.com/v2/after-call-work/upsert \\\n  -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' \\\n  -d '[\n    {\"id\": 0,  \"direction\": \"both\",    \"number\": [\"00353912345678\"], \"queue_id\": [],     \"tags\": 1, \"notes\": 10, \"timer\": 60},\n    {\"id\": 17, \"direction\": \"inbound\", \"number\": [],                 \"queue_id\": [\"10\"], \"tags\": 2, \"notes\": 0,  \"timer\": 120}\n  ]'\n# \u2192 204\n\n# What a phone must ask for after an inbound call from queue 10\ncurl 'https://api.api-nuacom.com/v2/after-call-work/settings?direction=inbound&queue_id=10' \\\n  -H 'Authorization: Bearer YOUR_API_KEY'\n# \u2192 [{\"id\":17,\"tags\":2,\"notes\":0,\"timer\":120}]\n```\n\n## When a tag or note is enforced\n\n```mermaid\nflowchart TD\n    callEnds[\"Call ends on a matching number/queue and direction\"] --> lookup[\"GET /v2/after-call-work/settings<br/>direction + number or queue_id\"]\n    lookup --> rules{\"Matching rule(s)?\"}\n    rules -- \"none (empty array)\" --> nothing[\"Nothing mandatory\"]\n    rules -- \"yes\" --> prompt[\"Softphone requires at least `tags` tags<br/>and a note of `notes` words\"]\n    prompt --> timer[\"Countdown timer (at most 180s) bounds the wait\"]\n    timer -- \"submitted before timer ends\" --> submitted[\"Tag/note written via Call Tags / Call Notes endpoints\"]\n    timer -- \"timer runs out\" --> expired[\"Softphone stops waiting\"]\n```\n\n## Roles and access\n\n- Every endpoint in this group is open to any authenticated user of the account; none requires an account admin.\n\n## Pitfalls\n\n- The save is an upsert keyed on `id`: a rule you leave out of the array is kept, not deleted (use the delete endpoint), and `id: 0` always creates. Any other id must be one of the account's existing rules.\n- Send every key of every rule (`direction`, `number`, `queue_id`, `tags`, `notes`, `timer`); a rule with a missing key makes the save fail.\n- Numbers and queue ids are stored as sent and are not checked against the account's numbers and queues. Store numbers as `00` + country code + national number and queue ids as strings (`[\"10\"]`): the lookup matches them in exactly that form.\n- `timer` is capped at `180` seconds (`422` above it); `tags` and `notes` have no upper bound.\n- The softphone notification is best-effort: when it fails, the request still answers `204` and the rules are saved; phones apply them once they next reload their rules.\n- `GET /v2/after-call-work/settings` needs `direction` and one of `number` / `queue_id` (`422` otherwise). Sending both narrows the answer to rules that name both, which is rarely what you want."
        },
        {
            "name": "Call AI",
            "description": "Call AI is what NUACOM extracts from a call recording once it has been transcribed: a summary, the conversation split by channel, the topics discussed, the action items and the overall sentiment. This group holds two read-only endpoints, one for a single call and one for every call of a period. The full transcript with timings, talk time and search lives in [Speech To Text](/v2/docs/groups/speech-to-text), the audio in [Call Recording](/v2/docs/groups/call-recording), and the call ids you need come from [Call Logs](/v2/docs/groups/call-logs).\n\n## Workflow (what the portal does)\n\n1. **Find the call**: take `call_id` from a [`GET /v2/call-log`](/v2/ref#/operations/callLog.callLog) row that has `recording: true`. `call_id` is the telephony id shared by every leg of a call; `call_unique_id` is not accepted here.\n2. **One call**: [`GET /v2/calls/{callId}/ai-data`](/v2/ref#/operations/v2.getCallAiData) answers the object described below. It is JSON unless you ask for XML with an `Accept` header containing `application/xml` or `text/xml`, or with `?format=xml`. `format` accepts only `json` and `xml`; anything else answers `422`.\n3. **A period**: [`GET /v2/calls/ai-data`](/v2/ref#/operations/v2.listCallAiData) with `date_from` and `date_to`, both required, as `Y-m-d` or `Y-m-d H:i:s` (a bare date spans the whole day), at most 31 days apart and `date_to` not before `date_from`; `page` (default 1) and `per_page` (1\u2013100, default 25). It answers `{\"data\": [...], \"meta\": {\"page\", \"per_page\", \"total\"}}`; each item is the object below plus `callId` and `callDate`. This endpoint is JSON only.\n\n```bash\ncurl 'https://api.api-nuacom.com/v2/calls/svr13-core2-1753839825.12345/ai-data' \\\n  -H 'Authorization: Bearer YOUR_API_KEY'\n```\n\n```json\n{\n  \"summary\": \"Megan from NUACOM asked for Brian about a telecommunications offer; he was unavailable, so she left a message asking to be called back.\",\n  \"transcription\": [\n    {\"channel\": 1, \"text\": \"Good morning, Mullen and Sons.\"},\n    {\"channel\": 0, \"text\": \"Hi, is Brian available?\"},\n    {\"channel\": 1, \"text\": \"He is not, can I take a message?\"}\n  ],\n  \"topics\": [\"Callback request\", \"Telecommunications\"],\n  \"actionItems\": [\"Brian to call Megan back\"],\n  \"averageSentiment\": \"neutral\"\n}\n```\n\n## Reading the response\n\n| Field | Content |\n| --- | --- |\n| `summary` | A few sentences describing the call. |\n| `transcription` | The utterances in order, each `{\"channel\": <int>, \"text\": \"...\"}`; the channel separates the two parties of the recording. |\n| `topics` | Short labels for what was discussed. |\n| `actionItems` | Follow-ups extracted from the conversation. |\n| `averageSentiment` | The tone of the whole call: `positive`, `neutral` or `negative`; `Unknown` when none was computed. |\n\nIn XML the root element is `<aiData>`; `transcription` entries are `<item>` elements with `<channel>` and `<text>`, `topics` entries are `<topic>` and `actionItems` entries are `<actionItem>`.\n\n## Enabling AI data\n\nA call gets AI data when it was recorded and the account had an active AI Analysis add-on at the time:\n\n- **Unlimited AI Call Analysis**: every recorded call is analysed.\n- **Free AI Call Analysis**: an allowance of minutes, reset monthly. The duration of each analysed call is deducted from it, and new calls are no longer analysed once it is used up.\n\n[`GET /v2/speech-to-text/active`](/v2/ref#/operations/accountAddonStt.currentAddon) tells you which one is active; an admin switches them with the subscription endpoints described in [Speech To Text](/v2/docs/groups/speech-to-text). Analysis runs in the background after the recording is stored, so the data for a call that has just ended arrives later.\n\n## Roles and access\n\n- Any authenticated user can call both endpoints.\n- The single-call endpoint applies the recording rules: account admins may read any call; other users need the **Call Recording Access** setting on their user, and the call must be visible to them (on their own extension, or on the numbers, extensions and queues granted to them; a user whose call-log permission is \"all\" sees every call). A call outside that scope, including an id that does not exist, answers `403`.\n- The period endpoint has no per-user filter: it returns the AI data of every call of the account.\n- Accounts that opted out of recording with the No Recordings add-on get `403` from both endpoints.\n\n## Pitfalls\n\n- `404` with `{\"message\": \"No AI data available for this callId\"}` covers every \"nothing to show\" case: an unknown id (for an admin), a call that was not recorded, not analysed yet, recorded before the add-on was active, or whose analysis failed. There is no \"pending\" state to tell them apart.\n- A recording too short to summarise still answers `200`: `summary` is then the placeholder `Unable to summarize. Recording is too short or lacks conversational content.`. Check for it before showing the summary.\n- `date_from` and `date_to` are compared with the stored call date, which is Irish time (`Europe/Dublin`); `X-Timezone` is not read. `callDate` in the response is UTC ISO 8601 (`2026-06-01T09:00:00.000000Z`).\n- `meta.total` counts the account's call-log rows in the period, not the items returned. Rows without AI data are skipped, so a page can carry fewer than `per_page` items, even none, while later pages still do. Walk every page up to `total / per_page` instead of stopping at an empty one.\n- A call with several legs (transfers, queue legs) has several call-log rows sharing one `call_id`, and each row yields an item: the same analysis can appear more than once in a page. De-duplicate on `callId`.\n- `format=xml` on the period endpoint does nothing; only the single-call endpoint speaks XML."
        },
        {
            "name": "Speech To Text",
            "description": "Speech To Text is the transcript NUACOM produces from a call recording, together with the analysis built on it: summary, topics, action items, sentiment per utterance and talk time per party. This group holds the transcript endpoint, a search-and-highlight variant and, under **Speech To Text / Subscription**, the endpoints that manage the AI Analysis add-on that enables transcription. [Call AI](/v2/docs/groups/call-ai) returns a condensed view of the same data; the audio is in [Call Recording](/v2/docs/groups/call-recording) and the call ids come from [Call Logs](/v2/docs/groups/call-logs).\n\n## Workflow (what the portal does)\n\n1. **Check the subscription**: [`GET /v2/speech-to-text/active`](/v2/ref#/operations/accountAddonStt.currentAddon) returns the active AI Analysis add-on as `addon_id`, `addon_name`, `addon_price`, `added_date` and `qty`, or `{\"addon_id\": 0}` when there is none.\n2. **Open a transcript**: from a [`GET /v2/call-log`](/v2/ref#/operations/callLog.callLog) row with `recording: true` (the list's `has_transcriptions` filter narrows it to transcribed calls), call [`GET /v2/speech-to-text/{callUniqueId}`](/v2/ref#/operations/speechToText.getCallSTT) with the row's `call_id`. The document is described below.\n3. **Search inside it**: [`POST /v2/speech-to-text/{callUniqueId}/highlight`](/v2/ref#/operations/speechToText.getHighlightedCallSTT) with `{\"search\": \"invoice\"}` answers the same document only when it matches, with every match wrapped in `<span class='qmatch'>\u2026</span>` inside `summary`, `topics`, `actionItems` and the utterances. The query syntax is below.\n4. **Change the subscription** (admins): see [Subscription](#subscription).\n\n```bash\ncurl -X POST 'https://api.api-nuacom.com/v2/speech-to-text/svr13-core2-1753839825.12345/highlight' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"search\": \"\\\"invoice\\\" + \\\"refund\\\"\"}'\n```\n\n## Reading a transcript\n\n| Field | Content |\n| --- | --- |\n| `combinedRecognizedPhrases` | One entry whose `display` is the whole transcript as plain text. |\n| `recognizedPhrases` | One entry per utterance: `channel` and `speaker`, `offset` and `duration` as ISO 8601 durations (`PT12.5S`), `offsetInTicks` and `durationInTicks` (one tick is 100 ns, 10,000,000 per second), and `nBest` with `display` (the text), `words` (each with its own offset and duration) and `sentiment` (`sentiment` and `confidence`). |\n| `summary` | A few sentences describing the call, or the placeholder `Unable to summarize. Recording is too short or lacks conversational content.`. |\n| `topics`, `conversationTopics` | Labels for what was discussed. Some transcripts fill only `conversationTopics`; read both. |\n| `actionItems` | Follow-ups extracted from the conversation, as a list of strings; `\"\"` when none were extracted. |\n| `sentiment` | `positive`, `neutral` or `negative` for the whole call; `unknown` when none was computed. |\n| `talkTime` | One entry per channel with `channel`, `talkTimeDurationInTicks` and `percentage`, the integer share of the speaking time; `null` when not computed. |\n| `balance` | The account's AI allowance: `null` without an AI Analysis add-on, `1` with a paid one, otherwise the remaining free allowance, `0` or less once it is used up. |\n| `doc` | Unused, always `[]`. |\n\nA call that has no transcript answers `200` with the empty defaults (`summary` `\"\"`, lists `[]`, `sentiment` `\"unknown\"`, `talkTime` `null`) and `balance` still filled. It is not a `404`.\n\n### Search syntax\n\n| Query | Matches |\n| --- | --- |\n| `invoice` | Plain text is matched as a phrase, case-insensitively, allowing up to two words between the terms. |\n| `\"late payment\"` | A quoted phrase, same rules. |\n| `\"invoice\" + \"refund\"` | Both phrases. |\n| `\"invoice\" \\| \"refund\"` | Either phrase. |\n| `-\"refund\"` | The phrase must be absent. |\n| `\"invoice\" + (-\"refund\")` | The first phrase present and the second absent. |\n\nOperators only work on double-quoted terms; a `+`, `|` or `-` next to an unquoted word is searched as text. A term matches in any of `summary`, the utterances, `topics` or `actionItems`.\n\n## When a call is transcribed\n\nA recording is transcribed when the account has an active AI Analysis add-on:\n\n- **Unlimited AI Call Analysis**, a paid add-on: every recorded call.\n- **Free AI Call Analysis**: an allowance of minutes, reset monthly. The duration of each transcribed call is deducted from it; once the allowance is used up new calls are no longer transcribed, while existing transcripts stay readable.\n\nTranscription starts in the background once the recording is stored and takes a while, so a row that already shows `recording: true` can still have no transcript. The transcript is produced in the language configured for the account: English unless an admin set a default call language or per-number overrides with [`POST /v2/account-language-config`](/v2/ref#/operations/account-language-config.store) (where enabled for the account; [`GET /v2/language-options`](/v2/ref#/operations/v2.languageOptions) lists the choices). The summary, topics, action items and sentiment are generated from that transcript.\n\n## Subscription\n\nTwo AI Analysis add-ons exist: **Free AI Call Analysis** (`addon_id` `1124`, no charge, a monthly allowance of minutes) and **Unlimited AI Call Analysis** (`addon_id` `1128`, a monthly price per extension). Only one is active at a time; activating one cancels the other.\n\nSubscription states:\n\n```mermaid\nstateDiagram-v2\n    [*] --> None: no AI Analysis add-on\n    None --> Free: upgrade addon_id 1124 (no charge)\n    None --> Unlimited: upgrade addon_id 1128 (charged pro-rata)\n    Free --> Unlimited: upgrade addon_id 1128\n    Unlimited --> Free: downgrade addon_id 1124 (no charge)\n    Free --> None: DELETE /v2/speech-to-text/deactivate\n    Unlimited --> None: DELETE /v2/speech-to-text/deactivate\n```\n\n1. [`GET /v2/speech-to-text/calculate/{addonId}`](/v2/ref#/operations/accountAddonStt.calculate) prices an activation from today to the end of the month: `unitPrice` (the monthly price), `cleanAmount` (the pro-rata part for the remaining days; the full price on the 1st), `extensionsCount` (the account's extensions), `subTotal` (`cleanAmount` \u00d7 `extensionsCount`), `accountVatRate`, `vatAmount` (VAT on `cleanAmount`), `total` (`subTotal` plus VAT), `billingPeriodStart`, `billingPeriodEnd`, `billingCurrency`, `addonName`, `transactionName` and `isNextMonth` (`false`). An id that is not an AI Analysis add-on offered to your account answers `400` `{\"message\": \"Addon not found\"}`.\n2. [`POST /v2/speech-to-text/upgrade`](/v2/ref#/operations/accountAddonStt.upgrade) with `addon_id` and, for a paid add-on on a pre-pay account, `paymentMethod` (the id of one of the account's saved payment methods). It cancels the current AI add-on and its pending charges, activates the new one, sets the free allowance when the add-on has one, and charges the pro-rata amount at once when it has a price: a pre-pay account's payment method is charged immediately, a bill-pay account is billed for it. `204`.\n3. [`POST /v2/speech-to-text/downgrade`](/v2/ref#/operations/accountAddonStt.downgrade) with `addon_id` makes the same switch without a charge. `204`.\n4. [`DELETE /v2/speech-to-text/deactivate`](/v2/ref#/operations/accountAddonStt.deactivate) cancels every active AI Analysis add-on and any upcoming charge. `204`.\n\n`upgrade` and `downgrade` answer `422` with `errors` when `addon_id` is not an AI Analysis add-on (`Wrong addon type.`), is already active (`This addon is already active.`) or, on a pre-pay account activating a paid add-on, when `paymentMethod` is missing or unknown (`Invalid payment method.`). An `addon_id` that does not exist, or that is not offered to your account, answers `404`. A declined card answers `400` with an `error_code`.\n\n## Roles and access\n\n- Transcript and highlight: any authenticated user who may listen to the recording. Account admins always may; other users need the **Call Recording Access** setting on their user, and the call must be visible to them (own extension, or the numbers, extensions and queues granted to them; call-log permission \"all\" covers every call). Otherwise `403`, also for an id that does not exist; the highlight endpoint says `You are not authorized to access information about this call.`. Accounts with the No Recordings add-on get `403` for every call.\n- `active`: any authenticated user; the answer includes the add-on's price.\n- `calculate`, `upgrade`, `downgrade` and `deactivate`: account admins only; anyone else gets `403` `\"Forbidden\"`.\n\n## Pitfalls\n\n- `{callUniqueId}` is the call-log row's `call_id`, the telephony id shared by the legs of one call; `call_unique_id` finds nothing.\n- Nothing distinguishes \"not transcribed yet\" from \"never will be\": both answer `200` with empty fields. Test `recognizedPhrases` rather than the status code, and treat the placeholder summary as \"no summary\".\n- The highlight markup is inside the strings (`<span class='qmatch'>\u2026</span>`): strip it before reuse. `balance` is always `0` in that response.\n- `upgrade` charges without a preview: call `calculate` first and show the `total` to the user. Switching to the Free add-on resets its allowance to the monthly amount.\n- `deactivate` takes effect at once: transcription stops for new calls, existing transcripts stay readable.\n- `added_date` in `active` is a plain `Y-m-d H:i:s` string unless the account has the ISO dates option, which renders it in ISO 8601 in the requested timezone."
        },
        {
            "name": "Speech To Text / Subscription"
        },
        {
            "name": "Keyword Tracker",
            "description": "A keyword tracker watches the transcripts of your recorded calls for words or phrases. When a call matches, the tracker tags the call and emails the people you chose, with the summary and the matching lines of the transcript. Trackers run on the transcript and analysis NUACOM produces for a recorded call, so they need the AI Analysis add-on described in [Speech To Text](/v2/docs/groups/speech-to-text); the summary, topics and action items they search are the ones [Call AI](/v2/docs/groups/call-ai) returns. This group holds the list, create, show, update and delete of a tracker and a switch to enable or disable one.\n\n## Workflow (what the portal does)\n\n1. **List**: [`GET /v2/keyword-trackers`](/v2/ref#/operations/keyword-trackers.index) answers every tracker of the account as a plain array; there is no paging and no filter. Each item is `id`, `tracker_name`, `account_id`, `keywords`, `is_active`, `filters`, `email_alerts` and `tag_ids` (the tag ids as a list of strings).\n2. **Create**: [`POST /v2/keyword-trackers`](/v2/ref#/operations/keyword-trackers.store) with:\n   - `tracker_name` (required, at most 255 characters);\n   - `keywords` (required, at most 1024 characters): the rule, see [Writing the rule](#writing-the-rule);\n   - `is_active` (required boolean);\n   - `filters`: whose calls are watched, a list of `{\"id\": \u2026, \"group\": \u2026}` entries, see [Who is watched, who is told](#who-is-watched-who-is-told);\n   - `email_alerts`: who receives the alert, the same shape;\n   - `tags`: ids from the call tag catalogue ([`GET /v3/call-tags`](/v2/ref#/operations/v3.call-tags.index)), as strings; they are attached to every call the tracker matches.\n   The answer is the tracker as the list shows it.\n3. **Show**: [`GET /v2/keyword-trackers/{trackerId}`](/v2/ref#/operations/keyword-trackers.show). An id that is not one of your account's trackers answers `404`.\n4. **Update**: [`PUT /v2/keyword-trackers/{trackerId}`](/v2/ref#/operations/keyword-trackers.update) takes the same body as create and replaces the whole tracker: a list you leave out becomes empty.\n5. **Enable or disable**: [`PATCH /v2/keyword-trackers/{trackerId}/status/{status}`](/v2/ref#/operations/keywordTracker.setKeywordTrackerStatus) with `1` to enable or `0` to disable (any number other than `1` disables). It answers the tracker; a disabled tracker is kept but never matches.\n6. **Delete**: [`DELETE /v2/keyword-trackers/{trackerId}`](/v2/ref#/operations/keyword-trackers.destroy) answers `204`, also for an id that does not exist.\n\n```bash\ncurl -X POST 'https://api.api-nuacom.com/v2/keyword-trackers' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"tracker_name\": \"Cancellation risk\",\n    \"keywords\": \"\\\"cancel\\\" | \\\"switch provider\\\"\",\n    \"is_active\": true,\n    \"filters\": [{\"id\": \"d12\", \"group\": \"User groups\"}],\n    \"email_alerts\": [{\"id\": \"4821\", \"group\": \"Users\"}],\n    \"tags\": [\"1001\"]\n  }'\n```\n\n```json\n{\n  \"id\": 7,\n  \"tracker_name\": \"Cancellation risk\",\n  \"account_id\": \"IE-00123\",\n  \"keywords\": \"\\\"cancel\\\" | \\\"switch provider\\\"\",\n  \"is_active\": true,\n  \"filters\": [{\"id\": \"d12\", \"group\": \"User groups\"}],\n  \"email_alerts\": [{\"id\": \"4821\", \"group\": \"Users\"}],\n  \"tag_ids\": [\"1001\"]\n}\n```\n\n## How a tracker runs\n\nA tracker is evaluated once per call, when the transcript and analysis of the recording have been stored, some time after the call ends ([Speech To Text](/v2/docs/groups/speech-to-text) explains when a call is transcribed). A call that has no transcript, no extension, or an extension that is not linked to a user is never checked.\n\nFor each active tracker:\n\n1. The rule is tested against the summary followed by the full transcript, and separately against each topic and action item. The tracker matches when either test passes.\n2. `filters` decides whether the call is one you watch. With an `Everyone` entry every call of the account is watched; otherwise the extension on the call, the caller's or the called party's, must belong to one of the listed users or to a member of one of the listed teams. An empty list watches nobody.\n3. On a match, the tracker's tags are attached to the call (a tag already on it is not duplicated); they then show on the call row and in [`GET /v2/call-tags`](/v2/ref#/operations/callLog.callTags). Then one email goes to each user in `email_alerts` and to each member of the teams listed there; suspended users are skipped. The email names the tracker, the user on the call and the other party, gives the date and time and a link to the call, and shows the summary with the matched terms highlighted plus up to 12 lines of the transcript from the first highlighted line.\n\n### Who is watched, who is told\n\n`filters` and `email_alerts` hold the same kind of entries, each with a required `id` and `group`, both strings of at most 50 characters:\n\n| `group` | `id` | Meaning |\n| --- | --- | --- |\n| `Users` | the user's `user_id`, as a string (`\"4821\"`) | that user's calls are watched, or that user is emailed |\n| `User groups` | `d` followed by the team id (`\"d12\"`) | every member of the team |\n| `Everyone` | required but not read; send `\"0\"` | every call of the account. Only meaningful in `filters` |\n\nThe `d` prefix on `id` is what makes an entry a team; `group` is a label the API stores for you and acts on only when it is `Everyone`. User ids come from [`GET /v3/users`](/v2/ref#/operations/v3.users.users.index), team ids from [`GET /v3/teams`](/v2/ref#/operations/v3.teams.teams.index); see [Users](/v2/docs/groups/users).\n\n### Writing the rule\n\n`keywords` is one rule in the syntax below. Terms are matched as whole words, so `\"cancel\"` does not match \"cancellation\".\n\n| Rule | Matches when |\n| --- | --- |\n| `invoice` | the word appears. A bare term must be written in lower case; the text is compared in lower case |\n| `\"late payment\"` | the phrase appears, in any case |\n| `\"invoice\" + \"refund\"` | both appear |\n| `\"invoice\" \\| \"refund\"` | either appears |\n| `-\"refund\"` | the term is absent |\n| `\"invoice\" + (-\"refund\")` | the first appears and the second is absent |\n\n`|` is applied last: `\"a\" + \"b\" | \"c\"` means (a and b) or c. Parentheses only wrap a single term, as in `(-\"b\")`; they cannot regroup an `|`. The characters `+` and `|` always split the rule, even inside quotes. A rule that starts with `-` has to pass both tests, the text and the topics, so combine a negation with a positive term rather than using it alone.\n\n## Roles and access\n\n- Every endpoint of this group works on the account your API key belongs to, and any user of that account may call it: there is no account-admin check. A tracker belongs to the account, not to the user who created it.\n- Alerts and tags only happen for calls that are transcribed: the account needs an active AI Analysis add-on ([`GET /v2/speech-to-text/active`](/v2/ref#/operations/accountAddonStt.currentAddon)) and, with the Free add-on, an allowance that is not used up. Without it the trackers are stored but never match.\n- The recipients are not checked against call-log or recording permissions: everyone you list receives the transcript excerpt.\n\n## Pitfalls\n\n- Ids are strings: `\"tags\": [1001]` or `{\"id\": 12, \u2026}` answers `422`; send `\"1001\"` and `\"12\"`.\n- `PUT` replaces everything. Leave `tags` out and the tracker ends with no tags, answered as `tag_ids: [\"\"]` rather than `[]`; a tracker created without tags answers the same.\n- An empty `filters` list matches no calls. To watch every call add `{\"id\": \"0\", \"group\": \"Everyone\"}`.\n- `Everyone` in `email_alerts` emails nobody; list the users or teams.\n- A tracker with no recipients still tags the matching calls.\n- Commas are not separators: `invoice,refund` is matched as that literal text. Use `\"invoice\" | \"refund\"`.\n- A bare term with a capital letter never matches; quote it or write it in lower case.\n- Trackers are evaluated once, when the analysis is stored. Editing or enabling a tracker does not re-check earlier calls.\n- `DELETE` answers `204` for an id that does not exist, so a mistyped id looks like success."
        },
        {
            "name": "Autodialer",
            "description": "The autodialer runs outbound campaigns: a list of numbers that one extension calls one after the other, with a pause between calls, a ring timeout and retries for the numbers that did not answer. The calls themselves are placed by the NUACOM portal in the agent's browser; the API holds what the dialer works from \u2014 the campaigns and their settings, the numbers with their status and retry counters, and the statistics. Numbers can be loaded from your own lists or picked from [Contacts](/v2/docs/groups/contacts).\n\n## Workflow (what the portal does)\n\n1. **Campaigns**: [`GET /v2/auto-dialer/campaigns`](/v2/ref#/operations/campaigns.index) lists them 15 per page (`page`), newest first, with an optional `status` filter. Account admins see every campaign; other users only those whose `sign_to` is their own extension. Each campaign carries `numbers_count` and a `stats` block.\n2. **Create**: [`POST /v2/auto-dialer/campaigns`](/v2/ref#/operations/campaigns.store) with `name` (up to 250 characters), `phone_number` (the caller ID, one of the account's own numbers), `delay` (seconds between calls, at least 1), `max_response_time` (seconds to let a call ring before hanging up, at least 1), `max_retries` (how many more times a number that did not answer is tried, 0 or more), `sign_to` (the extension number that runs the campaign, e.g. `\"32\"`), optional `time_to_recall` (the wait before such a number may be dialled again, at least 1), optional `status` (defaults to `initial`) and optional `contacts` (up to 2000 numbers to load at once). Answers `201` with the campaign.\n3. **Load numbers**: [`POST /v2/auto-dialer/campaign/{campaignId}/numbers/upload`](/v2/ref#/operations/autodialerCampaignNumber.upload) with `{\"numbers\": [\"+353861234567\", \"0861234568\"]}`, 1 to 2000 per request; the portal builds this list from a pasted text or a `.txt` file with one number per line. Numbers are validated for the account's country, normalised to international format, de-duplicated and skipped when already in the campaign; new ones start as `initial`. `204`. To add one number, [`POST /v2/auto-dialer/campaign/{campaignId}/numbers`](/v2/ref#/operations/numbers.store) with `number` or `contact_id` (the contact's mobile number, or its first number when it has no mobile) and an optional `status`; `201` with the number.\n4. **Read**: [`GET /v2/auto-dialer/campaigns/{campaignId}`](/v2/ref#/operations/campaigns.show) for one campaign, [`GET /v2/auto-dialer/campaign/{campaignId}/numbers`](/v2/ref#/operations/numbers.index) for its numbers (1000 per page, newest first) and [`GET /v2/auto-dialer/campaign/{campaignId}/numbers/{numberId}`](/v2/ref#/operations/numbers.show) for one of them.\n5. **Dial** (portal only): the agent presses Play in the portal. The browser places the calls through the agent's extension, moves the campaign to `in_progress` with [`PUT /v2/auto-dialer/campaigns/{campaignId}`](/v2/ref#/operations/campaigns.update), records the outcome of each attempt on the number with [`PUT /v2/auto-dialer/campaign/{campaignId}/numbers/{numberId}`](/v2/ref#/operations/numbers.update) (`status`), and sets the campaign back to `initial` when it stops. The API does not start or stop dialling.\n6. **Statistics**: [`GET /v2/auto-dialer/campaigns/{campaignId}/stats`](/v2/ref#/operations/autodialerCampaign.stats) answers `{\"answered\": 10, \"not_answered\": 10, \"all\": 20, \"percentage\": 50}`: the counts of numbers in those statuses, the total, and the integer share of numbers that are finished (`answered` or `voicemail`; a `not_answered` number is not finished because it may be retried). The same block is embedded in every campaign as `stats`.\n7. **Across campaigns**: [`GET /v2/auto-dialer/calls`](/v2/ref#/operations/autodialer.autodialerCall) lists the numbers of all the account's campaigns, filtered by `campaign_id`, `agent` (the campaign's `sign_to`), `status`, `date_from` and `date_to` (`Y-m-d` or `Y-m-d H:i:s`; a bare date covers the whole day), paginated with `per_page` (1\u20131000, default 50).\n8. **Edit and delete**: `PUT \u2026/campaigns/{campaignId}` takes any subset of the fields of step 2, plus `contacts` to load more numbers, and answers `202` with the campaign; `PUT \u2026/numbers/{numberId}` takes `number` and `status` and answers `202`. [`DELETE /v2/auto-dialer/campaigns/{campaignId}`](/v2/ref#/operations/campaigns.destroy) and [`DELETE /v2/auto-dialer/campaign/{campaignId}/numbers/{numberId}`](/v2/ref#/operations/numbers.destroy) answer `204`.\n\n```bash\ncurl -X POST 'https://api.api-nuacom.com/v2/auto-dialer/campaigns' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"name\": \"October renewals\",\n    \"phone_number\": \"+35312345678\",\n    \"delay\": 15,\n    \"max_response_time\": 30,\n    \"max_retries\": 2,\n    \"time_to_recall\": 60,\n    \"sign_to\": \"32\",\n    \"contacts\": [\"+353861234567\", \"+353871234568\"]\n  }'\n```\n\n## Vocabulary\n\nA campaign's `status` is free text up to 50 characters; the portal uses `initial` (idle) and `in_progress` (dialling).\n\nA number's `status` is one of:\n\n| Status | Meaning | Finished |\n| --- | --- | --- |\n| `initial` | Not dialled yet. | no |\n| `in_progress` | Being dialled now. | no |\n| `not_answered` | Did not answer; eligible for a retry. | no |\n| `answered` | Answered and completed. | yes |\n| `voicemail` | Reached voicemail. | yes |\n\nEach number also carries `retries` (attempts made so far) and `last_retry` (when the last attempt was made). The portal's dialer reads them against the campaign settings: a number that did not answer is dialled again while `retries` is below `max_retries`, and only once `time_to_recall` has passed since `last_retry`.\n\n## Dial status lifecycle\n\n```mermaid\nstateDiagram-v2\n    [*] --> initial: loaded via upload, numbers.store or contacts\n    initial --> in_progress: dialled\n    in_progress --> not_answered: no answer\n    in_progress --> answered: answered and completed\n    in_progress --> voicemail: reached voicemail\n    not_answered --> in_progress: retries < max_retries and time_to_recall elapsed\n    answered --> [*]\n    voicemail --> [*]\n```\n\n## Roles and access\n\n- Every endpoint is open to any authenticated user of the account; there is no admin-only operation.\n- Only the campaign list is filtered by role: non-admins get the campaigns assigned to their extension (none at all when their user has no extension). Every other endpoint checks only that the campaign belongs to the account, so a non-admin who knows a campaign id can read and change it.\n- A campaign or number of another account, or an unknown id, answers `404` `{\"message\": \"Resource not found!\"}`.\n\n## Pitfalls\n\n- Two path shapes: campaigns live under `/v2/auto-dialer/campaigns/{campaignId}`, numbers under `/v2/auto-dialer/campaign/{campaignId}/numbers` (singular `campaign`).\n- `sign_to` is the bare extension number (`\"32\"`), whatever the example in the reference suggests; any other value answers `422` `The selected extension does not belong to your account.`. A non-admin whose extension is not the campaign's `sign_to` does not see it in the list.\n- `phone_number` must be one of the account's numbers, in any national or international spelling; it is stored as sent.\n- Adding one number with `number` stores the string as sent: no format check beyond 30 characters, no normalisation and no duplicate check, unlike `upload` and `contacts`. Prefer `upload`, or `contact_id`, which resolves and normalises the contact's number. Sending neither answers `422` `A number or contact_id is required`; a contact without a phone number answers `422`; a contact of another account `404`.\n- `retries` and `last_retry` are maintained by the dialer: the API reports them but does not accept them as input \u2014 `PUT \u2026/numbers/{numberId}` takes `number` and `status` only.\n- Successful updates answer `202`, not `200`.\n- `date_from` and `date_to` on `/v2/auto-dialer/calls` filter by the date the number was added to its campaign, not by `last_retry`.\n- Lists are paginated resources (`data`, `links`, `meta`); a single campaign or number is returned bare, without a `data` wrapper.\n- Timestamps are ISO 8601 in UTC (`2022-11-24T11:15:54.000000Z`). With the account's ISO dates option, `created_at` and `updated_at` follow the requested timezone while `last_retry` stays in UTC."
        },
        {
            "name": "Reports",
            "description": "Reports are the account's call history aggregated or filtered for one question: which callers still need a call back, who calls most, when the lines are busiest, how much each extension handles, and which queue calls an agent let ring. This group holds the missed-call report (a user view, an account-wide view and a CSV export of each), the top-callers report, the busy-hours reports by hour, day and month, the two extension-usage reports and the queue skipped-calls report. All but the last one are built from the same rows as [Call Logs](/v2/docs/groups/call-logs) and take the same filters; the emailed summary of the missed-call report is configured in [Reports / Missed Call Follow-up](/v2/docs/groups/reports-missed-call-follow-up).\n\n## Workflow (what the portal does)\n\nThe call-log reports read their inputs from the query string (`GET`) or the request body (`POST`), as plain comma-separated strings. The period is `from_date` and `to_date`, see [Period and filters](#period-and-filters); every other call-log filter (`type`, `extensions`, `queues`, `number`, `search_for`, \u2026) applies too.\n\n1. **Missed calls to follow up**: [`GET /v2/missed-call-report`](/v2/ref#/operations/callLog.missedCalls) lists inbound calls that were not answered. The portal sends `type=missed,include_voicemail,include_playback,group_missed_calls` (unanswered inbound calls, including those that ended in voicemail or an announcement, one row per caller who has not been called back) and `empty=src_extension` (callers from outside the account only), with `from_date`, `to_date`, `sort_by` (`call_date`, `from`, `from_ext`, `to` or `to_ext`; `call_date` by default), `sort_dir` (`ASC` by default), `per_page` (default 25, no maximum) and `page` (default 1). The answer is `{\"_embedded\": [rows], \"_links\": {\u2026}, \"page_count\": <current page>, \"page_size\", \"total_items\"}`; `_links` holds `next` and `last` while there are more pages and `prev` and `first` after the first one, and a `Link` header repeats them. Each row carries `id`, `call_date`, `direction`, `status` and `last_app` (how and where the call ended), the caller as `from` / `from_local` / `from_name`, the number dialled as `to` / `to_local` / `to_name`, the extensions involved as `from_ext` / `from_extension` and `to_ext` / `to_extension` (number and name), the queue the call was waiting in as `call_in_queue` / `call_in_queue_name`, and `original_sip_call_id`.\n2. **Account-wide view**: [`GET /v2/admin-missed-call-report`](/v2/ref#/operations/callLog.missedCallsAdmin) takes the same inputs and answers the same shape, but ignores the caller's call-log permissions: every missed call in the account.\n3. **CSV export**: [`POST /v2/missed-call-report-export`](/v2/ref#/operations/callLog.missedCallsExport) and [`POST /v2/admin-missed-call-report-export`](/v2/ref#/operations/callLog.missedCallsAdminExport) take the same filters (the portal posts `from_date`, `to_date`, `type` and `empty`) and answer `204`: the file is built in the background and emailed to the user behind the token, newest call first, with the columns Date, Call Type, From Name, From, To Name, To, To Ext, To Ext Name, Queue No and Queue Name. Dates in the file are `Y-m-d H:i:s` in the `X-Timezone` you send (an IANA name; anything else is replaced by Europe/Dublin), or in your profile timezone without it. The user export sees what the user sees; the admin export covers the whole account.\n4. **Top callers**: [`GET /v2/top-callers-report`](/v2/ref#/operations/callLog.topCallers) with `from_date`, `to_date` and `type`: `incoming` ranks the callers of answered inbound calls by their number, `outgoing` the numbers dialled on answered outbound calls; add `missed` or `unanswered` to count the unanswered ones as well (`type=incoming,missed`). The answer is `{\"_embedded\": [{\"group\": \"+353861234567 - Jane Doe\", \"calls_count\": 12, \"contacts\": {\u2026}}, \u2026], \"total_items\": 20}`: at most 20 rows, most calls first. `group` is the number alone when nothing names it, `number - name` when a phonebook or integration contact matches (`contacts` then carries that contact) or when the number is a system short code; withheld callers appear as `\u2026 - Anonymous`.\n5. **Busy hours**: [`POST /v2/hourly-busy-hours-report`](/v2/ref#/operations/callLog.hourlyBusyHours), [`POST /v2/daily-busy-hours-report`](/v2/ref#/operations/callLog.dailyBusyHours) and [`POST /v2/monthly-busy-hours-report`](/v2/ref#/operations/callLog.monthlyBusyHours) count answered and missed calls per hour, day or month of the period. The portal sends `from_date`, `to_date`, `type` (`incoming,missed,include_voicemail,include_playback` by default, that is every inbound call) and optionally `number` to look at one of the account's numbers. The answer is an array with one entry per bucket of the whole period, zero-filled: `[{\"period\": \"2026-05-04 09:00\", \"answered_value\": 14, \"missed_value\": 3}, \u2026]`; `period` is `Y-m-d H:00`, `Y-m-d` or `Y-m`. `answered_value` counts calls with status `ANSWERED`, `missed_value` every other status (`NO ANSWER`, `BUSY`, `FAILED`).\n6. **Extension usage**: [`POST /v2/extension-call-direction-report`](/v2/ref#/operations/callLog.directionExtensionUsage) counts calls per extension and [`POST /v2/extension-call-duration-report`](/v2/ref#/operations/callLog.durationExtensionUsage) sums their duration in seconds. Inputs are `from_date`, `to_date`, `extensions` (comma-separated extension numbers; empty for all of them) and `type` (the portal sends `outgoing,unanswered,incoming,missed,include_voicemail,include_playback,include_internal` when nothing is ticked). Only calls with an extension on at least one side are counted. The answer is an array with one object per extension, ordered by extension number; the duration report names its columns `Voicemail_duration` \u2026 `Total_duration`:\n\n   ```json\n   [{\"Extension\": \"Jane Doe - 101\", \"Voicemail\": 0, \"Playback\": 1, \"Internal\": 3, \"Incoming\": 12, \"Missed\": 2, \"Outgoing\": 8, \"Unanswered\": 1, \"Total\": 27}]\n   ```\n\n   `Extension` is `name - number`, or the bare number for an extension without a name. A call counts once for the extension that made it and once for the one that received it, so an internal call appears in two rows. Durations are the connected time of answered calls and the ring time of the others.\n7. **Queue skipped calls**: [`GET /v2/reports/queue-skipped-calls`](/v2/ref#/operations/v2.getQueueSkippedCalls) with `queue` (queue number), `from` and `to` (both required, `to` after `from`) and optionally `agent` (extension number) returns the queue events of every call in that queue that an agent (that agent, when given) let ring without answering. The answer is a plain array ordered by call, then by time, one entry per event: `{\"call_id\": \"1651753116.134\", \"queue\": \"100\", \"agent\": \"10\", \"caller_id\": \"0861234567\", \"status\": \"RINGNOANSWER\", \"event_date\": \"May 4 2026 09:12:30\"}`. The portal opens it from the Queue Reports page as the call flow of a queue or of an agent; see [Queues](/v2/docs/groups/queues) for queue numbers and [Reading the queue events](#reading-the-queue-events) for `status`.\n\n```bash\n# Callers of May 2026 still waiting for a call back, Dublin time, 25 per page\ncurl 'https://api.api-nuacom.com/v2/missed-call-report?from_date=2026-05-01%2000:00:00&to_date=2026-05-31%2023:59:59&type=missed,include_voicemail,include_playback,group_missed_calls&empty=src_extension&per_page=25&page=1' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -H 'X-Timezone: Europe/Dublin'\n```\n\n## Period and filters\n\n- `from_date` and `to_date` take `Y-m-d` (expanded to `00:00:00` and `23:59:59`) or `Y-m-d H:i:s`. They are wall-clock values read in the `X-Timezone` header (or `timezone` parameter) if you send one, otherwise in the profile timezone of the user behind the token, otherwise Europe/Dublin; see [Dates and timezones](/v2/docs/dates-and-timezones).\n- Send both. With only one, or none, the report covers the last month: every call since one month before now. There is no maximum range in the API; the portal limits its own date pickers (31 days on the missed-call report).\n- Output: `call_date` and the busy-hours `period` are wall-clock `Y-m-d H:i:s` in your profile timezone on the legacy contract. With the ISO dates option, `call_date` becomes ISO 8601 in the `X-Timezone` offset (UTC by default) and `period` is labelled in the timezone your dates were read in. The CSV exports keep `Y-m-d H:i:s`.\n- `type` is a comma-separated list. Naming a direction excludes the calls that ended in voicemail or in an announcement unless you add the `include_*` values; omitted altogether, every call counts.\n\n| `type` value | Selects |\n|---|---|\n| `incoming` | inbound calls that were answered |\n| `missed` | inbound calls that were not answered |\n| `outgoing` | outbound calls that were answered |\n| `unanswered` | outbound calls that were not answered |\n| `include_internal` | calls between two extensions |\n| `include_voicemail`, `include_playback` | keep the calls that ended in voicemail or in an announcement |\n| `group_missed_calls` | one row per caller, keeping only callers who were not called back, and did not call again and get through, within the period |\n\n- `extensions` (as source or destination extension), `queues`, `number` (as caller or as number dialled; one or two values match as substrings, three or more exactly), `incoming_number`, `outgoing_number` and `search_for` narrow the calls as on the call log; `empty=src_extension` keeps calls from outside the account.\n\n## Reading the queue events\n\nEvery event of a skipped call is listed, not only the skip. `status` is one of:\n\n| `status` | Meaning |\n|---|---|\n| `RINGNOANSWER` | the agent was rung and declined, or the ring timed out |\n| `COMPLETEAGENT`, `COMPLETECALLER` | the call was answered by an agent and then ended, hung up by the agent or by the caller |\n| `ABANDON` | the caller hung up while waiting |\n| `EXITWITHTIMEOUT` | the call timed out in the queue and moved to another step or hung up |\n| `TRANSFER` | the call was transferred to another agent or number |\n\nThe other values (`inQue`, `CONNECT`, `EXITWITHKEY`, `EXITEMPTY`) are the queue events they name. `call_id` is shared by every event of the same call; `queue` and `agent` are the queue number and the extension number; `caller_id` is the caller's number as the queue saw it, empty on some events; `event_date` is `M j Y H:i:s` in the caller's profile timezone.\n\n## Roles and access\n\n- Every endpoint is open to any authenticated user, except [`POST /v2/admin-missed-call-report-export`](/v2/ref#/operations/callLog.missedCallsAdminExport), which needs an account admin and answers `403` with the body `\"Forbidden\"` otherwise.\n- The user reports (missed calls and its export, top callers, busy hours, extension usage) follow the call-log visibility rules: an admin, or a user whose call-log permission is \"all\", sees the whole account; everyone else only the calls on their own extension and on the numbers, extensions and queues granted to them, and with no grants the answer is empty, not `403`.\n- The account-wide missed-call list and export, and the queue skipped-calls report, cover the whole account regardless of grants.\n- The ISO dates option (per account) changes the date formats as described above; the skipped-calls `event_date` is always `M j Y H:i:s` in the caller's profile timezone and ignores `X-Timezone`.\n\n## Pitfalls\n\n- The generated reference shows no parameters for the call-log reports: they read the raw request. Use the inputs above, as comma-separated strings (`extensions=101,102`, not `extensions[]`).\n- The missed-call endpoints do not add the missed filter themselves. Without `type=missed` they list every call of the period; without `group_missed_calls` every unanswered leg of a call is a row, called back or not.\n- An unparsable date silently becomes 1970-01-01, and a value carrying a UTC offset is shifted again by the input timezone. Send wall-clock values and set `X-Timezone`.\n- `page_count` is the current page, not the number of pages; paginate on `total_items` and `page_size`. `_links` is `[]` on a single page and an object otherwise.\n- Missed-call rows whose caller is not a dialable number (withheld numbers, park and speed-dial codes) are dropped after pagination: a page can hold fewer rows than `page_size`, and `total_items` is only corrected when everything fits on one page.\n- Missed-call rows carry no `call_id` or `call_unique_id`; to reach the recording or notes of a call, find it on [`GET /v2/call-log`](/v2/ref#/operations/callLog.callLog) by date and number.\n- Exports are asynchronous and arrive by email; the request returns no job id and answers `204` even when nothing matches. They ignore `sort_by` and, unlike the call-log export, have no row limit.\n- Top callers always answers `total_items: 20`, whatever the number of rows. `incoming` and `outgoing` count answered calls only, and numbers shorter than six characters (extensions, short codes) are dropped. Without `type` the report groups every call, internal ones included, by the number dialled.\n- Busy hours counts whatever `type` selects: omit it and outbound and internal calls are counted too.\n- On the extension-usage reports `extensions=all` answers an empty array; omit the parameter, or send it empty, to get every extension. The duration report fails with `500` when `extensions` is missing altogether: always send it, empty if need be.\n- Queue skipped calls: `from` and `to` are compared with the stored event time as given, `X-Timezone` is ignored, and a date-only `to` ends at midnight, so send `to=2026-05-31 23:59:59`. `agent` picks which calls are included, not which rows: the events of the other agents on those calls are listed too. Validation errors answer `422` with `errors` alone, no `message`."
        },
        {
            "name": "Reports / Missed Call Follow-up",
            "description": "The Missed Call Follow-up report, [`GET /v2/missed-call-report`](/v2/ref#/operations/callLog.missedCalls) in [Reports](/v2/docs/groups/reports), lists the callers who were not answered and have not been called back. This sub-group schedules an email summary of it: one setting per account and report page, holding the recipients, the period the email covers, the hour it is sent at and the timezone of both. Four endpoints: read the setting, create or update it, delete it, and send the email now.\n\n## Workflow (what the portal does)\n\nThe portal's **Get Email Updates** button on the report, shown to account admins only, drives all four:\n\n1. **Read**: [`GET /v2/missed-call-followup-settings/{reportId}`](/v2/ref#/operations/missedCallFollowupSetting.show) with the report id (`34`, see [Report ids](#report-ids)) pre-fills the form. It answers `200` with `{\"data\": {\"id\", \"account_id\", \"report_id\", \"email\", \"period\", \"hour\", \"timezone\", \"is_enabled\"}}`, or `200` with `{\"data\": null, \"message\": \"No settings found for this report.\"}` when nothing is configured yet, not `404`. `timezone` is the effective one: the value saved, or the account's timezone when none was.\n2. **Save**: [`POST /v2/missed-call-followup-settings`](/v2/ref#/operations/missedCallFollowupSetting.store) creates the setting or replaces the existing one for that `report_id`. The portal sends `email`, `report_id` and `timezone` and leaves the rest to the defaults.\n\n   | Field | Required | Rules |\n   |---|---|---|\n   | `email` | yes | One or more addresses separated by commas, 2000 characters at most; every address must be valid |\n   | `report_id` | yes | `34` or `340` |\n   | `period` | no | `daily` (default), `weekly` or `monthly` |\n   | `hour` | no | The hour to send at, as `HH:00`; `08:00` by default |\n   | `timezone` | no | An IANA name such as `Europe/Dublin`; the account's timezone by default |\n   | `is_enabled` | no | `true` by default; `false` keeps the setting but stops the emails |\n\n   It answers `200`, on create as well, with `{\"message\": \"Settings saved successfully.\", \"data\": {\u2026}}`, the same `data` as the read. Validation failures answer `422` with `errors`, for instance `Invalid report ID. Must be 34 or 340.`, `Invalid hour format. Must be in HH:00 format (e.g., 08:00).` or `Invalid email address(es): \u2026`.\n3. **Delete**: [`DELETE /v2/missed-call-followup-settings/{reportId}`](/v2/ref#/operations/missedCallFollowupSetting.destroy) answers `200` with `{\"message\": \"Settings deleted successfully.\"}`, or `404` with `{\"message\": \"No settings found to delete.\"}`.\n4. **Send now**: [`POST /v2/missed-call-followup-settings/{reportId}/send-now`](/v2/ref#/operations/missedCallFollowupSetting.sendNow) queues the email immediately, with the saved period and recipients, and answers `200` with `{\"message\": \"Report has been queued and will be sent shortly.\"}`, or `404` when no setting exists for that id. NUACOM enables it per account; elsewhere it answers `403` with `{\"message\": \"This endpoint is not available for your account.\"}` and the portal hides the button.\n\n```bash\ncurl -X POST https://api.api-nuacom.com/v2/missed-call-followup-settings \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"email\": \"reception@example.com,manager@example.com\", \"report_id\": 34, \"period\": \"daily\", \"hour\": \"08:00\", \"timezone\": \"Europe/Dublin\"}'\n# \u2192 {\"message\": \"Settings saved successfully.\", \"data\": {\"id\": 17, \"account_id\": \"IE-00123\", \"report_id\": 34, \"email\": \"reception@example.com,manager@example.com\", \"period\": \"daily\", \"hour\": \"08:00\", \"timezone\": \"Europe/Dublin\", \"is_enabled\": true}}\n```\n\n## The scheduled email\n\n- **When**: NUACOM's scheduler runs once an hour and sends a setting when the current hour in its timezone equals `hour`, so the email arrives within that hour. `daily` sends every day, `weekly` on Sundays, `monthly` on the first day of the month.\n- **Which period**: `daily` covers yesterday, `00:00:00` to `23:59:59` in the setting's timezone; `weekly` the seven days before today; `monthly` from the same day of the previous month to yesterday, which is the previous calendar month when sent on the 1st.\n- **What it says**: the subject is `NUACOM - Missed Call Follow-up Report` (your own brand name on a branded account). The body is titled *Yesterday's*, *Last Week's* or *Last Month's* *Missed Calls Report* and reads \"On <first day of the period> you had: Missed N call(s), Returned N call(s), Remaining N call(s)\", with a link to the report page in the portal. When all three are zero it says you had zero missed calls instead.\n- **How it counts**: *Missed* is the number of callers from outside the account whose inbound call was not answered in the period, calls that ended in voicemail or an announcement included, one per number, leaving out those who were called back or who called again and got through before the period ended, and leaving out withheld numbers and system short codes: the rows the account-wide report shows for that period. *Returned* is how many of those numbers have since received an answered outbound call from the account, up to the moment the email is generated. *Remaining* is the difference.\n- **Who receives it**: every address in `email`, in one message; recipients need not be portal users.\n- **What it does not do**: it covers the whole account, with no queue or extension filter, and it does not list the calls. The queue each call was waiting in is in the report rows (`call_in_queue`, `call_in_queue_name`) and in the CSV export, see [Reports](/v2/docs/groups/reports).\n- **When it stays silent**: a disabled setting, an account that is not active, or an `email` without a single valid address: nothing is sent and nothing is reported back.\n\n## How the scheduled summary is sent\n\n```mermaid\nflowchart TD\n    save[\"POST /v2/missed-call-followup-settings<br/>email, period, hour, timezone\"] --> wait[\"Scheduler runs once an hour\"]\n    wait --> hourMatch{\"Current hour in setting's timezone == hour?\"}\n    hourMatch -- \"no\" --> wait\n    hourMatch -- \"yes\" --> gate{\"is_enabled, account active,<br/>email has a valid address?\"}\n    sendNow[\"POST .../{reportId}/send-now\"] --> gate\n    gate -- \"no\" --> silent[\"Nothing sent, nothing reported back\"]\n    gate -- \"yes\" --> compute[\"Compute Missed / Returned / Remaining for the period\"]\n    compute --> email[\"Email every address in email, one message\"]\n```\n\n## Report ids\n\n`report_id` names the portal report page the setting belongs to and the email links to: `34` is the Missed Call Follow-Up report, the view of [`GET /v2/missed-call-report`](/v2/ref#/operations/callLog.missedCalls); `340` is its account-wide version, [`GET /v2/admin-missed-call-report`](/v2/ref#/operations/callLog.missedCallsAdmin). The two ids hold independent settings, but the email is the same for both: account-wide counts, as above. The portal reads and saves `34` from both pages, so a setting saved under `340` is never shown there.\n\n## Roles and access\n\n- All four endpoints require an account admin; any other user gets `403` with the body `\"Forbidden\"`. An API key acts as the admin who created it.\n- The setting belongs to the account, not to the user who saved it: every admin reads and changes the same one.\n- Send now is additionally restricted to the accounts NUACOM has enabled it for (`403` with a `message` otherwise).\n\n## Pitfalls\n\n- `hour` must be zero-padded: `8:00` passes validation but never matches the scheduler's hour, so the email is never sent. Send `08:00`.\n- Saving replaces the whole setting. An omitted `period`, `hour`, `timezone` or `is_enabled` goes back to its default; send every field each time, not only the one you change.\n- The read answers `200` with `data: null` when nothing is configured; only the delete answers `404`.\n- Send now answers `200` \"queued\" even when the setting is disabled, the account is not active or no recipient is valid; in those cases nothing is sent.\n- Only `34` and `340` are accepted on save; the read, delete and send-now endpoints accept any integer and simply find nothing.\n- `timezone` must be an IANA name; abbreviations and offsets are rejected with `Invalid timezone.`\n- The date in the email is the first day of the period: on a weekly or monthly report it is not the day the email was sent."
        },
        {
            "name": "Conversations",
            "description": "Conversations is the messaging module: one thread per contact and channel, with the same message, participant and delivery-status shapes for SMS (`channel_type` 1), WhatsApp (2) and MMS (3). This guide covers the thread endpoints, delivery statuses, assignment rules, webhooks and prices. What each channel needs before you can send is in its own guide: [Conversations / SMS](/v2/docs/groups/conversations-sms) (credit, sender names, templates, MMS, the legacy history endpoints) and [Conversations / WhatsApp](/v2/docs/groups/conversations-whatsapp) (sender, templates, media, the 24-hour window). Forwarding inbound SMS to email is configured in the portal (**Settings \u2192 SMS**).\n\n## Vocabulary\n\n- A **conversation** has an `id` (UUID), a `channel_type`, the `sender_id` it is sent from (your sender name or number), `participants` (`participant_type` `phone_number`, `email` or `user`; `participant_id`; `is_system_user` for your own users), `is_group`, `assigned_to_id` / `assigned_department_id`, `is_pinned`, `is_active` (`false` once archived), `unread_count`, `last_message_at` and, for WhatsApp, `expires_at` (the end of the 24-hour reply window). `channels` lists every channel the same contact has written on.\n- A **message** has `direction` (`inbound` / `outbound`), `message_type` (0 text, 5 image, 6 video, 7 file, 8 location, 9 audio, 10 sticker, 11 contact), `content`, `content_url`, `attachments` (one entry per media file with `content_url`, `thumbnail_url`, `mime_type`, `file_size`), `metadata` (`template_id` and `template_variables` for a template, `location`, `media`, and `media_error` when an inbound file could not be fetched), `scheduled_for`, `is_draft` and `statuses`: one row per recipient with `status` (0 pending, 1 sent, 2 delivered, 3 read, 4 failed, 5 scheduled), `error_code`, `error_description`.\n\n## Workflow (what the portal does)\n\n1. **The inbox**: [`GET /v2/conversations`](/v2/ref#/operations/conversation.index) lists the account's threads, newest activity first. Filters: `search` (number, name or text), `channel` (1, 2 or 3), `from_date` / `to_date` (`Y-m-d`, the portal defaults to the last 31 days), `status` (last message status, 0\u20135), `assigned_to_id`, `is_active` (`0` to include archived threads), `is_group`, `unread=1`, `unassigned=1`, `expires_in_hours` (WhatsApp windows closing soon; the last three drop pagination and return up to 500 rows), `sorts` (comma-separated, `-` for descending, for example `is_pinned,-last_message_at`), `page`, `per_page` (default 15). The response is paginated: `data`, `total`, `per_page`, `current_page`, `last_page`, `from`, `to`. [`GET /v2/conversations/unread-count`](/v2/ref#/operations/conversation.unreadCount) is the badge counter.\n2. **Open a thread**: [`GET /v2/conversations/{conversation}`](/v2/ref#/operations/conversation.show) returns the conversation with `participants` and its non-draft `messages` in chronological order, and marks it read for the calling user. WhatsApp messages are included only when the account has the WhatsApp feature.\n3. **Reply**: [`POST /v2/conversations/{conversation}/messages`](/v2/ref#/operations/conversation.addMessage) with `content`, or media as `content_url` / `content_file` (WhatsApp) or `media_ids` (MMS), or a template as `metadata.template_id` plus `metadata.template_variables`. Optional `scheduled_for`, `is_draft`, `opt_in` / `opt_out` (SMS), and `channel_type` to pick the channel on a thread that has both SMS and WhatsApp. Answers `201` with the message; an archived thread is restored. `402` means no credit, `400` carries the domain `code` of a failed send (see the SMS guide), `422` a validation failure or a closed WhatsApp window.\n4. **Start a thread**: [`POST /v2/conversations`](/v2/ref#/operations/conversation.store) with `channel_type`, `sender_id`, either `participants[]` or, for SMS campaigns, `contacts` (comma-separated numbers), `groups` (contact group ids) or `message_contacts` (reuse the recipients of an earlier message), and `message` (`content`, `content_url`, `content_file`, `media_ids`, `metadata.template_id`, `metadata.template_variables`, `scheduled_for`). An existing thread with the same contact is reused. A single recipient answers `201` with the conversation; a bulk send answers `201` with `success_count`, `failed_count`, `total_count` and, when the landline filter dropped numbers, `warning_code`, `warning` and `warning_detail`.\n5. **Schedule and cancel**: `scheduled_for` is `Y-m-d H:i:s`, must be in the future and is read in the user's timezone (or `X-Timezone`). The message sits with status 5 until delivery; [`DELETE /v2/conversations/{conversation}/messages/{message}`](/v2/ref#/operations/conversation.cancelScheduledMessage) cancels it and refunds the reserved credit.\n6. **Organise**: [`PATCH \u2026/archive`](/v2/ref#/operations/conversation.archive) (no body), [`PATCH \u2026/pin`](/v2/ref#/operations/conversation.pin) (`is_pinned`, omit to toggle), [`PATCH \u2026/assign`](/v2/ref#/operations/conversation.assign) (`user_id` or `department_id`, `null` to unassign; account admin), [`PATCH \u2026/read-status`](/v2/ref#/operations/conversation.changeReadStatus) (`status` `read` or `unread`).\n7. **Delivery**: [`GET /v2/conversations/messages/{messageId}`](/v2/ref#/operations/v2.getMessageInfo) is one message or, with `is-bulk=1`, the bulk group it belongs to; [`POST /v2/conversations/messages/{message}/statuses`](/v2/ref#/operations/v2.getMessageStatuses) lists the per-recipient statuses of a message or bulk group (`is-bulk`, `filter[search]` by number, `filter[status]`, `type`, `start`, `length`), each with `status`, `error_code`, `error_description` and `cost`.\n8. **Rules**: [`GET /v2/conversations/settings`](/v2/ref#/operations/settings.index) and [`POST /v2/conversations/settings`](/v2/ref#/operations/settings.store) (account admin) hold, per channel key (`sms`, `whatsapp`), `auto_assigning` rules (`numbers[]` \u2192 `assign_to {type: user|department, id}`) and `time_to_respond` rules (`numbers[]` \u2192 minutes); `available_numbers` lists the numbers you can put in a rule. The whole settings object is replaced on every save.\n9. **Be told, not poll**: [`POST /v2/webhook-subscriptions`](/v2/ref#/operations/webhook-subscriptions.webhook-subscriptions.store) with `type` `message_received` or `message_sent` sends every inbound or outbound message of any channel to your URL (payloads and delivery rules in the [Webhooks](/v2/docs/groups/webhooks) guide).\n10. **Prices**: [`GET /v2/account/messaging-rates-countries`](/v2/ref#/operations/v2.getAccountMessagingRatesCountries) then [`GET /v2/account/messaging-rates?country_code=IE`](/v2/ref#/operations/v2.getAccountMessagingRates): one row per channel (1 SMS, 2 WhatsApp with `wa_message_type`, 3 MMS) with the per-message `price` in the account currency.\n\n## Roles and access\n\n- Any authenticated user can list, open, start and reply; `assign` and the rules endpoints need an **account admin** (`403` otherwise). Opening a thread the user may not see answers `403`.\n- the WhatsApp for Business add-on enables channel 2 and the MMS option enables `media_ids` on channel 1; without them the input is ignored or answers code 6101.\n- The ISO dates option (per account) returns every timestamp as ISO 8601 in the requested `X-Timezone`; without it the thread and message timestamps are ISO 8601 in UTC with microseconds (`2026-05-01T13:30:00.000000Z`) and `X-Timezone` is ignored. See [Dates and timezones](/v2/docs/dates-and-timezones).\n\n## Pitfalls\n\n- `channel_type`, `message_type` and every `status` are integers; `direction` is a string.\n- One contact, one thread: a number that writes to you on SMS and on WhatsApp shares a conversation, with both channels in `channels`. Send `channel_type` with the reply, or the thread's default channel is used.\n- A WhatsApp thread with `expires_at` in the past accepts templates only; see the WhatsApp guide. SMS threads have `expires_at: null`.\n- An inbound WhatsApp file that could not be fetched arrives as a message without `content_url` and with `metadata.media_error.code` (`MEDIA_TOO_LARGE`, `UNSUPPORTED_MEDIA_TYPE`, `MEDIA_DOWNLOAD_FAILED`, `MEDIA_PROCESSING_FAILED`, `MEDIA_TOO_LARGE_PROVIDER`).\n- The SMS group still serves the older inbox, timeline and sent-history endpoints the portal's SMS pages use; they return the same messages in DataTables-style shapes and are documented in the SMS guide. New integrations should read through this group."
        },
        {
            "name": "Conversations / Messages"
        },
        {
            "name": "Conversations / Settings"
        },
        {
            "name": "Conversations / SMS",
            "description": "SMS is the first channel of [Conversations](/v2/docs/groups/conversations): credit bought in packages, an approved sender name, optional templates, and three ways to send. This guide follows the portal's **New Message** page and its **Sent History** and **SMS Inbox** reports, and covers MMS, which is an SMS with `media_ids` for US, Canadian and Australian numbers. Forwarding inbound SMS to email is configured in the portal (**Settings \u2192 SMS**).\n\n## Before you send\n\n1. **Credit**: [`GET /v2/sms/packages`](/v2/ref#/operations/smsPackages.index) lists the packages (`id`, `amount` of credits, `cost`); [`POST /v2/top-up/sms/calculate`](/v2/ref#/operations/topUp.calculateSmsTopUp) with `package_id` quotes `amount`, `vat` and `total`; [`POST /v2/top-up/sms`](/v2/ref#/operations/topUp.smsTopUp) with `package_id` and a saved `payment_method` buys it (account admin; `400` with `error_code` `PAYMENT-INCOMPLETE` means the card needs 3-D Secure in the portal). Auto top-up is [`GET`](/v2/ref#/operations/topUp.getSmsAutoTopUp), [`POST`](/v2/ref#/operations/topUp.saveSmsAutoTopUp) (`package_id`, `payment_method`, `credit_limit`) and [`DELETE /v2/top-up/auto/sms`](/v2/ref#/operations/topUp.deleteSmsAutoTopUp). The balance is `sms_balance` on the account info.\n2. **Sender name**: [`GET /v2/sms/sender_names`](/v2/ref#/operations/smsSenderNames.getSenderNames) returns the approved names (`filter[channel]=sms`; `whatsapp` returns the WhatsApp numbers instead, each row carries `channel`). [`POST /v2/sms-sender-name`](/v2/ref#/operations/v2.requestSmsSenderName) (account admin) requests a new one: `sender_name` of 3 to 11 letters and digits, not digits only; `is_ireland_sender: true` when it will write to Irish numbers, which registers it with ComReg (the organisation and contact fields on the request are the ComReg details). Approval is manual; until then the name is absent from the list and an Irish send answers code 6004.\n3. **Templates** (optional): [`GET /v2/sms-templates`](/v2/ref#/operations/sms-templates.index) with `filter[channel]=1`, `filter[status]=1`, `filter[search]`, `filter[usage]` (`sms`, `10dlc`, `whatsapp`), `sort`, `page`, `per_page`; [`POST /v2/sms-templates`](/v2/ref#/operations/sms-templates.store) with `name`, `message_text`, `channel: 1`, `sender_id`, `opt_in`, `opt_out`; [`PUT`](/v2/ref#/operations/sms-templates.update) and [`DELETE /v2/sms-templates/{smsTemplate}`](/v2/ref#/operations/sms-templates.destroy). Status codes are the same as for WhatsApp (1 approved is the one you can send with).\n4. **US numbers (10DLC)**: a message to a `+1` number must reference an approved campaign template, otherwise the send answers code 6005 (6106 for an unverified toll-free number). The campaign is requested with the same `POST /v2/sms-templates`, adding `config` (`description`, `message_samples[]`, `use_cases[]` from `additional=campaign_use_cases`, `will_include_links`, `will_include_phone_numbers`, `opt_in_description`); the resulting template has `usage: \"10dlc\"`, cannot be edited, and lists the campaign's numbers in `sender_names`. Send it with `template_id`, and leave `from` empty to let NUACOM pick a campaign number.\n\n## Sending (what the portal does)\n\n- **The compose flow** (New Message page): [`GET /v2/sms/search-contacts?q=`](/v2/ref#/operations/sms.searchContacts) suggests up to five phonebook entries (`name`, `number`); [`POST /v2/sms/overview`](/v2/ref#/operations/sms.overview) stages the message and quotes it: `from`, `message`, recipients as `contacts` (comma-separated numbers), `groups` (contact group ids) or `message_contacts` (the reference of an earlier send), `template_id`, `time_to` for a scheduled send, `send_to_opted_in`, `opt_in` / `opt_in_message`, `opt_out` / `opt_out_message`, the landline filter (`ll_sniff`, `ll_sniff_from`, `ll_sniff_to`, `ll_last_activity`, `ll_visits_times`, `ll_visits_operation`), `channel_type` (1 SMS, 2 WhatsApp), `media_ids` for MMS and an `sms_session` of your own (any string up to 32 characters; reuse it to overwrite the staged draft). The answer carries `sms_session_id`, the valid, invalid and opted-out numbers, the segment count and the credit it will use. The portal's Send button then sends the staged draft; through the API, send with [`POST /v2/sms/send`](/v2/ref#/operations/sms.send) once the quote looks right.\n- **One call**: [`POST /v2/sms/send`](/v2/ref#/operations/sms.send) with `from`, `message`, `to[]` (`number`, optional `reference` echoed back), optional `send_at` (`Y-m-d H:i:s`; within two minutes it is sent at once), `template_id` and `media_ids`. The answer is `status` (`sent`, `scheduled`, `partial`, `failed`), `success_count`, `failed_count` and `numbers[]` with `number`, `international_number`, `reference`, `valid`, `message_id`, `status` and `error`. Keep `message_id`: it is the key for the status endpoints.\n- **In a thread**: [`POST /v2/conversations`](/v2/ref#/operations/conversation.store) and [`POST /v2/conversations/{conversation}/messages`](/v2/ref#/operations/conversation.addMessage) with `channel_type: 1`, described in the [Conversations](/v2/docs/groups/conversations) guide. This is the path for a reply inside an existing thread.\n- **Appointment reminders**: [`POST /v2/sms/appointment`](/v2/ref#/operations/sms.storeAppointment) with `contacts`, `sender_name`, `date_to_send`, `time_zone`, `send_before` (for example `1day`) and `sms_session` schedules the reminder relative to the appointment and answers `recipient`, `sms_message`, `scheduled_for` and `new_session_id`.\n- **MMS**: on accounts with the MMS option and every recipient in the US, Canada or Australia, upload each file first with [`POST /v2/mms/media`](/v2/ref#/operations/mms.uploadMmsMessageMedia) (multipart `file`; up to 10 files per message, images up to 5 MB, other files up to 500 KB) and pass the returned ids as `media_ids`. Images and videos are moderated asynchronously: poll [`GET /v2/mms/media/{mediaId}/moderation-status`](/v2/ref#/operations/mms.getMmsMediaModerationStatus) until `approved`, or the send answers 6105. MMS has its own rate in the messaging rates.\n\n**Result codes**: a failed send answers `400`, `402` or `422` with a `code` in the body. 6001 insufficient credit, 6002 no valid recipient, 6003 invalid sender, 6004 the sender is not approved for Irish numbers, 6005 US campaign not approved, 6006 delivery failed, 6007 scheduling error, 6008 partial bulk failure, 6009 whole bulk failed, 6010 draft not found, 6011 message limit reached, 6012 too many requests, 6013 auto top-up failed, 6014 send failed after the top-up; 6101 MMS disabled, 6102 MMS country not supported, 6103 too many files, 6104 media not found, 6105 media not approved yet, 6106 toll-free number not verified.\n\n## Reading\n\n- **New integrations** read through [`GET /v2/conversations`](/v2/ref#/operations/conversation.index) and the message status endpoints of the Conversations guide.\n- **Sent History**: [`POST /v2/sms/history`](/v2/ref#/operations/v2.getSmsMessages) is the report behind the portal's Sent History page, in DataTables form: `iDisplayStart`, `iDisplayLength`, `sSearch`, `type` (message type filter), `search_by_number` and `sEcho` in; `sEcho`, `iTotalRecords`, `iTotalDisplayRecords` and `aaData[]` out, one row per message or per bulk send (`bulk_id`, `status.counts`) with `message_id`, `conversation_id`, `channel_type`, `sender_id`, `destination_e164`, `message_text`, `scheduled_for`, `sent_by` and the `actions` the portal may offer. A bulk row expands with [`GET /v2/conversations/messages/{messageId}?is-bulk=1`](/v2/ref#/operations/v2.getMessageInfo) and [`POST /v2/conversations/messages/{message}/statuses?is-bulk=1`](/v2/ref#/operations/v2.getMessageStatuses).\n- **Inbox**: [`GET /v2/sms/inbox`](/v2/ref#/operations/smsGwInbox.index) lists inbound SMS and WhatsApp messages, newest first (`iDisplayStart`, `iDisplayLength`, `filter`), as `_embedded[]` with `date`, `sender`, `number`, `number_name_sender`, `number_name_dst`, `message`, `channel_type`, `message_type`, `content_url`, `content_filename`, `media_error`, plus `total_items`.\n- **Thread by numbers**: [`GET /v2/sms/timeline?src_number=&dst_number=`](/v2/ref#/operations/smsGwInbox.timeline) returns every SMS and WhatsApp message exchanged between two numbers, same row shape.\n- **Combined feed**: [`GET /v2/sms`](/v2/ref#/operations/smsMsg.index) is a paginated union of inbound and outbound SMS (`page`, `pageSize`, `filter`), kept for older clients.\n\n## Roles and access\n\n- Any authenticated user can send and read; buying credit, requesting a sender name and managing 10DLC campaigns need an **account admin**.\n- The MMS option, enabled per account by NUACOM, allows `media_ids`; without it the field is ignored on the overview and answers 6101 on a direct send.\n- The ISO dates option switches `scheduled_for` and the history dates to ISO 8601 in the requested `X-Timezone`.\n\n## Pitfalls\n\n- Numbers may be sent as `+353\u2026`, `00353\u2026` or local Irish format; the answer echoes `international_number`. The inbox and timeline hold international digits without `+`.\n- `send_at` and `time_to` are read in the user's timezone, not UTC; a value within two minutes is sent immediately.\n- The compose flow is two calls: `overview` only stages. A staged draft that is never sent stays as a hidden conversation.\n- `POST /v2/sms/history` is a POST although it only reads; the `GET` of the same path is a deprecated legacy report and is not part of the reference.\n- `opt_in` / `opt_out` append their text to the message and count toward its segments; opted-out numbers are dropped silently from the counts, not reported as errors."
        },
        {
            "name": "Conversations / SMS / Packages"
        },
        {
            "name": "Conversations / SMS / Sender Names"
        },
        {
            "name": "Conversations / SMS / Templates"
        },
        {
            "name": "Conversations / MMS"
        },
        {
            "name": "Conversations / WhatsApp",
            "description": "WhatsApp is the second channel of [Conversations](/v2/docs/groups/conversations) (`channel_type` 2). It is sent through the same thread endpoints as SMS, with three WhatsApp rules on top: the sender is a phone number connected to a Meta business account, a conversation that has had no inbound message for 24 hours accepts **approved templates only**, and media is moderated before it leaves. This group holds the template and media endpoints; the sender itself is connected in the portal.\n\n## Before your first message\n\n1. **Add-on and sender**: the account needs the WhatsApp for Business add-on and at least one connected number. Both are set up in the portal under **Integrations \u2192 WhatsApp for Business**: payment, a Twilio sub-account and Meta's Embedded Signup run in the browser, so those endpoints are not part of the public reference. Accounts that bring their own Twilio carrier (BYOC) cannot use WhatsApp.\n2. **Find your senders**: [`GET /v2/sms/sender_names?filter[channel]=whatsapp`](/v2/ref#/operations/smsSenderNames.getSenderNames) lists the connected numbers; `sender_name` is the value to send as `sender_id`. Up to 10 numbers per account.\n3. **Token**: the template and media endpoints need an **account admin** token. Without an active sender every endpoint of this group answers `403` \"No active WhatsApp sender found for your account\".\n\n## Templates (what the portal does)\n\n1. **List**: [`GET /v2/integrations/whatsapp/templates`](/v2/ref#/operations/integrations.whatsapp.templates.index) (`status`, `category`, `language`, `search`, `page`, `per_page` up to 100) or the shared [`GET /v2/sms-templates?filter[channel]=2`](/v2/ref#/operations/sms-templates.index), which is what the portal's template picker uses (`filter[status]=1` for sendable ones, `filter[exclude_dynamic_variables]=true` for automations that cannot fill placeholders).\n2. **Create**: [`POST /v2/integrations/whatsapp/templates`](/v2/ref#/operations/integrations.whatsapp.templates.store) with `name`, `category` (1 Authentication, 2 Marketing, 3 Utility: Meta prices and reviews them differently), `language`, `sender_id`, `body` (`text` with `{{1}}`\u2026`{{N}}` and one sample per placeholder in `variables`), optional `header` (`type` text, image, video or document; media as a `media_id` from the upload endpoint, a public `media_url` or an inline `media` file), `footer` and up to 10 `buttons`. The template is created locally with status 6 (Not Submitted); `submit_after_approval: true` submits it as soon as its header media passes moderation.\n3. **Edit or delete**: [`PUT`](/v2/ref#/operations/integrations.whatsapp.templates.update) is allowed while `permissions.can_edit` is true (Not Submitted, Rejected, Disabled or Media Rejected); an approved template is immutable, create a new one. [`DELETE`](/v2/ref#/operations/integrations.whatsapp.templates.destroy) works in every status and also removes the template from Twilio.\n4. **Submit**: [`POST /v2/integrations/whatsapp/templates/{smsTemplate}/submit`](/v2/ref#/operations/integrations.whatsapp.templates.submit) sends it to Meta. `200` with `status: \"submitted\"` and the `template_sid`; `202` with `status: \"pending_submit\"` when the header media is still being moderated (it is submitted automatically afterwards); `403` when the template is already approved or pending; `422` when a placeholder has no sample.\n5. **Wait for approval**: Meta decides asynchronously, usually within minutes, sometimes a day. Poll [`GET \u2026/templates/{smsTemplate}`](/v2/ref#/operations/integrations.whatsapp.templates.show): `status` is an integer and `status_label` its text: 0 Pending (submitted, awaiting Meta's review), 1 Approved, 2 Error (the submission failed; `status_label` reads \"Unknown\"), 3 Rejected, 4 Disabled, 5 Paused, 6 Not Submitted, 7 Pending Moderation (header media still being checked), 8 Pending Submit (queued for submission), 9 Media Rejected, 10 Deleted from Twilio (removed on the provider side; create a new one). Only **1** can be sent. An approved template can later become Paused or Disabled by Meta for quality reasons.\n\n## Template lifecycle\n\n```mermaid\nstateDiagram-v2\n    [*] --> NotSubmitted: created locally (status 6 Not Submitted)\n    NotSubmitted --> PendingModeration: submit_after_approval, header media uploaded (status 7)\n    PendingModeration --> PendingSubmit: media approved (status 8)\n    PendingModeration --> MediaRejected: media rejected (status 9)\n    PendingSubmit --> Pending: auto-submitted to Meta (status 0)\n    NotSubmitted --> Pending: POST \u2026/submit, 200 submitted (status 0)\n    NotSubmitted --> PendingSubmit: POST \u2026/submit, 202 pending_submit (status 8)\n    Pending --> Approved: Meta approves (status 1)\n    Pending --> Rejected: Meta rejects (status 3)\n    Pending --> Error: submission failed (status 2)\n    Approved --> Paused: Meta pauses for quality (status 5)\n    Approved --> Disabled: Meta disables (status 4)\n    Rejected --> [*]: DELETE, create a new one\n    MediaRejected --> [*]: DELETE, create a new one\n    Approved --> [*]: Deleted from Twilio (status 10)\n```\n\n## Media\n\n- **Upload**: [`POST /v2/integrations/whatsapp/media`](/v2/ref#/operations/integrations.whatsapp.media.upload) (multipart `file`; JPEG, PNG, MP4, AAC, MP3, AMR, 3GP, PDF, DOC, DOCX, PPTX, XLSX, VCF; 16 MB, images 5 MB) answers `media_id`, a signed preview `url`, `type`, `message_type` and `moderation_status`. Images and videos are moderated asynchronously (`pending` \u2192 `approved` or `rejected`); audio and documents are approved on upload. Rejected media cannot be sent or used in a template header. Template headers accept JPEG, PNG, MP4 and PDF only; an inline `header.media` file is checked on its real MIME type, not its extension, and the same 16 MB / 5 MB limits apply.\n- **Read**: an inbound or outbound file is the message's single `attachments[]` entry (`id`, `content_url`, `thumbnail_url`, `media_type`, `mime_type`, `file_size`, `filename`), and `content_url` and `thumbnail_url` are repeated on the message itself. `content_url` is a signed URL that expires. [`GET /v2/whatsapp/media/{media}/download-url`](/v2/ref#/operations/whatsapp.media.download-url) with the attachment's `id` issues a fresh one: `200` with `url` (valid for 15 minutes, usable directly in `<img>`, `<video>` and `<audio>`, no token needed), `expires_at`, `media_type` and `mime_type`; `202` with `status: \"pending\"` while the file is still being moderated, so poll until `200`; `403` when it was rejected or belongs to another account; `404` when the id does not exist.\n- **Previews**: for an image or video NUACOM also builds a JPEG thumbnail of at most 320 \u00d7 320 px in the background. `thumbnail_url` is a signed link that needs no token and stays the same until the end of the calendar year, so it can be cached; it answers `404` until the thumbnail exists and `403` once the media is rejected. It is `null` for audio, documents and messages without media.\n\n## Sending\n\n- **Start or reply** with [`POST /v2/conversations`](/v2/ref#/operations/conversation.store) (`channel_type: 2`, `sender_id`, one `participants[]` entry of type `phone_number`) or [`POST /v2/conversations/{conversation}/messages`](/v2/ref#/operations/conversation.addMessage). A message is exactly one of: text in `content`; media as `content_url` (a public URL NUACOM downloads and re-hosts), `content_file` (multipart) or a `media_id`-backed upload, with `content` as the caption; a template as `metadata.template_id` plus `metadata.template_variables` (one value per `{{N}}`, in order); a location as `metadata.location` (`latitude`, `longitude`, `label`). The answer is `201` with the message.\n- **The 24-hour window**: a contact's inbound message opens a window that ends 24 hours after their last message; `expires_at` on the conversation shows when. Inside it any message type is allowed; outside it the API answers `422` (`metadata.template_id` \"The Customer Service Window is closed\u2026\", or `error: WHATSAPP_CSW_CLOSED` on a new conversation) unless the message is an approved template. Templates can always be sent and reopen the conversation.\n- **Campaigns**: [`POST /v2/sms/overview`](/v2/ref#/operations/sms.overview) with `channel_type: 2`, `wa_template_id` and `wa_parameters` (JSON keyed by placeholder number) quotes a WhatsApp campaign and flags numbers that cannot receive WhatsApp as invalid; the portal's New Message page then sends the staged draft. Through the API, send to each recipient with [`POST /v2/conversations`](/v2/ref#/operations/conversation.store).\n- **Scheduling** uses `scheduled_for` like SMS; a scheduled message is cancellable until delivery.\n\n## Reading and delivery\n\n- Threads and messages come from [`GET /v2/conversations`](/v2/ref#/operations/conversation.index) (`channel=2`) and [`GET /v2/conversations/{conversation}`](/v2/ref#/operations/conversation.show); `statuses[]` move through sent, delivered and read as Meta reports them; a `failed` status refunds the message. An inbound file that could not be fetched arrives with `metadata.media_error.code` (`MEDIA_TOO_LARGE` above about 16 MB, `MEDIA_TOO_LARGE_PROVIDER` when Twilio rejected it, `UNSUPPORTED_MEDIA_TYPE`, `MEDIA_DOWNLOAD_FAILED`, `MEDIA_PROCESSING_FAILED`).\n- `message_received` and `message_sent` webhooks fire for WhatsApp as for SMS.\n\n## Pricing\n\nEach message is charged at request time (scheduled messages at delivery, Marketing and Authentication templates up front) from the SMS balance at the WhatsApp rate of the recipient's country, by category: a Marketing or Authentication template at its own rate; a Utility template and a free-form message at the cheaper \"service\" rate while the 24-hour window is open, the Utility rate outside it. [`GET /v2/account/messaging-rates?country_code=`](/v2/ref#/operations/v2.getAccountMessagingRates) lists them per `wa_message_type`. A message Meta reports as failed or undelivered is refunded once. `402` means the balance is empty.\n\n## Roles and access\n\n- Template and media endpoints: **account admin** with the WhatsApp for Business add-on and an active sender. Reading and sending through Conversations: any authenticated user on an account with the add-on.\n- Without the add-on WhatsApp messages are also hidden from the conversation and inbox endpoints.\n\n## Pitfalls\n\n- Recipients are phone numbers today (`participant_type: phone_number`, international format). Meta is rolling out WhatsApp usernames: a contact who hides their number will arrive with a business-scoped id instead, so do not parse `participant_id` as a phone number.\n- `status` and `category` are integers on the WhatsApp endpoints; `template_id` in `metadata` is the integer `id` of the template, not its `template_sid`.\n- A template's placeholders are positional: send `template_variables` in `{{1}}`, `{{2}}` order with every value present, or the send is rejected.\n- `content_url` must be fetchable by NUACOM without authentication; it is downloaded, moderated and re-hosted, so a private or expiring link fails with `422`.\n- Inbound files larger than about 95 MB never reach NUACOM: Meta drops them with no error on either side, so tell contacts the limit.\n- A sender number must not be in use on another WhatsApp Business account; connecting it moves it. Removing a number in the portal ends its threads' sending ability but keeps the history."
        },
        {
            "name": "Conversations / Messaging Rates"
        },
        {
            "name": "Fax",
            "description": "Fax is the account's fax-to-email service. A number NUACOM has set up for fax receives faxes and delivers each one by email, as a PDF, to the addresses you list for that number; the addresses you list as its senders may fax out through it, from the portal or from your own code. This group holds the account's numbers with their two email lists, the sending endpoint, the history of received and sent faxes, the processing queue, the file download and the history delete. Getting and assigning numbers is covered in [Numbers](/v2/docs/groups/numbers); how long fax history and files are kept is the account's fax data retention setting, see [Data Retention](/v2/docs/groups/data-retention).\n\n## Workflow (what the portal does)\n\n1. **Numbers and their email lists** (the portal's *Fax to Email* settings page): [`GET /v2/fax`](/v2/ref#/operations/fax.index) answers a plain array with one object per number assigned to the account: `id` (the number id every endpoint below takes), `number` (international digits without `+`, `35312345678`), `localized_number` (the same number in the account country's national format, `01 234 5678`, or in E.164 with `+` when it does not belong to that country), `name` (the line's label when the number is set to use it, otherwise `null`), `inbound_emails` and `outbound_emails` (arrays of addresses, empty when none are set). There is no paging, search or sort; the portal filters the array itself. Every active number of the account is listed, fax-capable or not.\n2. **Set the lists**: [`PUT /v2/fax/{numberId}/inbound_emails`](/v2/ref#/operations/fax.setInboundEmails) with `{\"emails\": [\"fax@example.com\"]}` sets who receives the faxes arriving on the number; [`PUT /v2/fax/{numberId}/outbound_emails`](/v2/ref#/operations/fax.setOutboundEmails) sets who may send through it. Each `PUT` replaces the whole list and answers `204`. `emails` must be present (`[]` clears the list), every entry must be a valid address, and an address may not appear twice whatever its case (`422`); addresses are stored in lower case. An outbound address identifies the number it sends from, so it can be registered on one number only: when any address in the list is already on another number, the request answers `400` with `error_code` `FAX-ROUTING-EMAIL-ALREADY-REGISTERED` and a `message` naming the addresses, and the list is left as it was. Inbound addresses may repeat across numbers. [`GET /v2/fax/{numberId}/inbound_emails`](/v2/ref#/operations/fax.listInboundEmails) and [`GET /v2/fax/{numberId}/outbound_emails`](/v2/ref#/operations/fax.listOutboundEmails) answer one list as a plain array of strings; [`DELETE /v2/fax/{numberId}/inbound_emails`](/v2/ref#/operations/fax.deleteInboundEmails) and [`DELETE /v2/fax/{numberId}/outbound_emails`](/v2/ref#/operations/fax.deleteOutboundEmails) clear it (`204`). An id that is not a number of the account answers `404`.\n3. **Inbox and Outbox**: [`GET /v2/fax/history`](/v2/ref#/operations/fax.history) is the fax list, paginated as `{\"data\": [rows], \"links\": {\u2026}, \"meta\": {\"current_page\", \"last_page\", \"per_page\", \"total\", \u2026}}`. Parameters, all optional: `direction` (`1` for received faxes, the Inbox; `0` for sent ones, the Outbox; omit for both), `search` (a substring of `email`, `sender` or `destination`; for a number send digits only, `353861234567`), `page`, `perPage` (default 15, no maximum), `sortBy` (`direction`, `email`, `sender`, `destination`, `send_timestamp`, `status` or `status_timestamp`) and `sortDir` (`asc` or `desc`, default `desc`). Without `sortBy` the rows come newest first, by `id`; with it, ties are broken by `id` in the same direction. Rows deleted in step 7 are left out. The portal asks for `direction` per tab with `perPage=15`, `sortBy=send_timestamp` and `sortDir=desc`.\n4. **Processing**: [`GET /v2/fax/queue`](/v2/ref#/operations/fax.queue) lists the faxes accepted but not yet processed, with the same parameters except that `sortBy` is one of `direction`, `email`, `sender`, `destination` or `timestamp`. Rows are `{\"id\", \"direction\", \"email\", \"sender\", \"destination\", \"timestamp\"}`; a fax leaves the queue when it gets its history row. The portal shows the sent ones (`direction=0`, `perPage=100`, newest first) on top of the first Outbox page as *Processing*. A queued fax has no file to download and cannot be deleted or cancelled.\n5. **Send a fax**: pick the sender from [`GET /v2/fax/can_send_fax`](/v2/ref#/operations/fax.canSendFax), the active numbers that have at least one outbound address, answered as the rows of step 1 without the two email lists. Then [`POST /v2/fax/{numberId}/send_fax`](/v2/ref#/operations/fax.sendFax) as `multipart/form-data` with `recipientNumber` (a `+` followed by 9 to 15 digits and nothing else, `+353861234567`) and `files[]`, one or more JPEG or PDF files (checked by content, not by name) of at most 5 MB together (5,242,880 bytes). The fax is submitted on behalf of the first address in the number's `outbound_emails`: a number without one answers `400` with `error_code` `FAX-SEND-NO-EMAILS`, an id that is not an active number of the account `404`, and a hand-over NUACOM's fax service refuses `400` with `FAX-SEND-ERROR`. Success is `204` with no body and no id: the request only confirms that the fax was accepted. It appears in the queue, then in the Outbox with `status` `1` (pending) until the transmission ends, when `status` and `status_timestamp` are updated.\n6. **Download**: [`GET /v2/fax/{faxRecord}/file`](/v2/ref#/operations/fax.file) with a history row's `id` answers the stored document itself: the body is the file, `Content-Type` is its detected type and `Content-Disposition: attachment; filename=\"\u2026\"` carries the file name (the header is exposed to browsers through `Access-Control-Expose-Headers`). An unknown id answers `404`, a row of another account `403`. The portal downloads a selection one file at a time; there is no bulk download.\n7. **Delete from history**: [`DELETE /v2/fax/history`](/v2/ref#/operations/fax.deleteFromHistory) with `ids`, an array of history row ids (the portal sends a JSON body, `{\"ids\": [12, 15]}`; `ids[]=12&ids[]=15` in the query string works too), hides the rows from the history and answers `204`. It is all or nothing: when any id is not a visible history row of the account, the request answers `400` with `message` `Records with the following IDs were not found: 15` and nothing is hidden. The ids must be distinct integers (`422`). There is no undo, the file stays downloadable by id, and a fax that is still being sent is not stopped.\n\n```bash\ncurl -X POST https://api.api-nuacom.com/v2/fax/1234/send_fax \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -F 'recipientNumber=+353861234567' \\\n  -F 'files[]=@invoice.pdf' \\\n  -F 'files[]=@signature.jpg'\n# \u2192 204 No Content; the fax shows in GET /v2/fax/queue, then in GET /v2/fax/history?direction=0\n```\n\n## Reading a row\n\n- `direction` is `1` for a received fax and `0` for a sent one.\n- `sender` and `destination` are JSON integers, the two numbers as international digits without `+` (`353861234567`). On a received fax `destination` is your number; on a sent fax `sender` is.\n- `email` is the address on the fax: the inbound address a received fax was delivered to, or the outbound address a sent fax was submitted from.\n- `status` (history only) is the outcome, simplified from the transmission result:\n\n| `status` | Meaning |\n|---|---|\n| `1` | Pending: queued or being transmitted |\n| `2` | Done: a sent fax was delivered, a received fax was emailed |\n| `3` | Failed: the line was busy or not answered, the call ended with no result, the number had no inbound address to deliver to, or the email could not be sent |\n| `4` | Undefined: a result NUACOM does not recognise |\n| `5` | Unreachable: the destination is out of order or does not support fax |\n\n- `send_timestamp` is when the fax was received or submitted and `status_timestamp` when `status` last changed; the queue's `timestamp` is when the fax entered the queue. On the legacy date contract all three are UTC with microseconds (`2026-05-01T13:30:00.000000Z`); with the ISO dates option they follow `X-Timezone` (`2026-05-01T14:30:00+01:00`), see [Dates and timezones](/v2/docs/dates-and-timezones).\n\n```json\n{\n  \"id\": 5821,\n  \"direction\": 0,\n  \"email\": \"office@example.com\",\n  \"sender\": 35312345678,\n  \"destination\": 353861234567,\n  \"send_timestamp\": \"2026-05-01T13:30:00.000000Z\",\n  \"status\": 2,\n  \"status_timestamp\": \"2026-05-01T13:31:12.000000Z\"\n}\n```\n\n## Roles and access\n\n- Every endpoint of the group is open to any authenticated user of the account; none needs an account admin.\n- Everything is scoped to the token's account: a number of another account answers `404`, a file of another account `403`.\n- Whether a number can actually receive faxes depends on how NUACOM provisioned it; the API does not check this, which is why `GET /v2/fax` lists every number of the account.\n- The ISO dates option (per account) changes the timestamp format, see [Dates and timezones](/v2/docs/dates-and-timezones).\n\n## Pitfalls\n\n- `direction` is `1` for received and `0` for sent, the reverse of what you might expect.\n- Sending is asynchronous. `204` means accepted, not delivered, and nothing in the response identifies the fax. Poll the Outbox: the newest row with your `destination` moves from `status` `1` to `2`, `3` or `5`. A fax cannot be cancelled once accepted.\n- `GET /v2/fax` lists every active number of the account, with or without email lists; only `GET /v2/fax/can_send_fax` lists the ones that can send, and its rows carry no `inbound_emails` or `outbound_emails` keys.\n- The two `PUT` endpoints replace the whole list: send the complete list, not just the new address. Outbound addresses are unique across every NUACOM number, not only the account's, so a `400` `FAX-ROUTING-EMAIL-ALREADY-REGISTERED` can name an address the account has never used.\n- `search` matches numbers as stored, digits only: `+353861234567` never matches, `353861234567` does.\n- `sender` and `destination` are integers in JSON, not strings.\n- `sortBy=status` sorts by the underlying transmission code, so the order does not follow the `status` values you receive.\n- `perPage` has no upper bound.\n- Deleting hides rows and is all or nothing; an id already deleted counts as not found (`400`). The file is kept and `GET /v2/fax/{faxRecord}/file` still serves it.\n- Queue ids and history ids are different sequences: never pass a queue `id` to the file or delete endpoints.\n- `recipientNumber` must be exactly `+` and 9 to 15 digits: `+353 86 123 4567`, `00353861234567` and `0861234567` answer `422`. Per-file validation errors are keyed `files.0`, `files.1`, \u2026, and the size error reads `The combined size of all files has exceeded 5120 kilobytes`.\n- The email-list `GET` and `PUT` answer `404` for a number that is no longer active on the account, while `DELETE` still clears its lists."
        },
        {
            "name": "Mailbox"
        },
        {
            "name": "Contacts",
            "description": "Contacts are the account's phonebook: the names shown on inbound calls, the entries behind click-to-call, SMS recipients and the source for CRM matching. A contact has up to five phone numbers, an optional email and address, and belongs to any number of **groups** and **organizations**. It is either **shared** with the whole account or **private** to the user who owns it.\n\nContacts have two endpoint families: `/v3/contacts\u2026`, which the NUACOM portal uses throughout and which you should prefer, and the older `/v2/contacts\u2026`, which has the same request and response shape but a narrower `perPage` choice and is not used by any NUACOM client.\n\n## Workflow (what the portal does)\n\n1. **List and search**: [`GET /v3/contacts`](/v2/ref#/operations/v3.contacts.contacts.index) with `page`, `perPage` (1\u2013500), `sort` (`-id` by default in the portal; `first_name`, `last_name`, `email`, `organization` are also allowed), and `filter[...]`: `search` (name, number, email or organization), `visibility` (`all`, `public`, `private`), `group[]`, `organization[]`, plus exact or `~`-prefixed partial matches on individual fields. Unknown filters and sorts answer `400`.\n2. **Create**: [`POST /v3/contacts`](/v2/ref#/operations/v3.contacts.contacts.store) with `first_name` or `last_name`, `phones[]` (international format, at most five) or `email`, optional `address_1`\u2026`address_4`, `post_code`, `country` (ISO 3166-1 alpha-2), `comments`, `birthdate`, `groups[]`, `organizations[]` and `private`. Pick group and organization ids from [`GET /v3/contacts/groups`](/v2/ref#/operations/v3.contacts.groups.index) and [`GET /v3/contacts/organizations`](/v2/ref#/operations/v3.contacts.organizations.index).\n3. **Read and edit**: [`GET /v3/contacts/{contactId}`](/v2/ref#/operations/v3.contacts.contacts.show), then [`PUT /v3/contacts/{contactId}`](/v2/ref#/operations/v3.contacts.contacts.update) with the **complete** contact: the update replaces every phone and address field with what you send.\n4. **Group and organization membership**: [`PUT /v3/contacts/{contactId}/groups`](/v2/ref#/operations/v3.syncContactGroups) replaces a contact's groups; [`POST /v3/groups/contacts/bulk`](/v2/ref#/operations/v3.groups.contacts.bulk) adds many contacts to many groups; [`POST /v3/contacts/organizations/bulk`](/v2/ref#/operations/v3.bulkAddContactsToOrganization) and [`DELETE /v3/contacts/organizations/bulk`](/v2/ref#/operations/v3.bulkRemoveContactsFromOrganization) do the same for organizations.\n5. **Visibility**: [`POST /v3/contacts/bulk/visibility`](/v2/ref#/operations/v3.bulkChangeContactVisibility) with `contacts[]` and `visible` shares a contact (`true`) or makes it private to you (`false`).\n6. **Delete**: [`DELETE /v3/contacts/{contactId}`](/v2/ref#/operations/v3.contacts.contacts.destroy) for one contact, [`DELETE /v3/contacts`](/v2/ref#/operations/v3.bulkDeleteContacts) with `contacts[]` for many. Deletes are soft: `filter[trashed]=with` or `only` shows deleted contacts.\n7. **Bulk import**: [`POST /v3/contacts/import`](/v2/ref#/operations/v3.contactsImport) with a CSV, XLS or XLSX file and the 0-based column indexes (`first_name_index`, `last_name_index`, `phone_indexes[]`, `email_index`, \u2026), optional `group_ids[]` and `private_user_id`. Up to 100 rows are processed in the request; larger files answer `isAsync: true` with an `importId` to poll at [`GET /v3/contacts/import/status/{importId}`](/v2/ref#/operations/v3.contactsImportStatus) (`pending`, `processing`, `completed`, `failed`, with `progress`).\n8. **Export**: [`GET /v3/contacts/export`](/v2/ref#/operations/v3.exportContacts) accepts the list's `filter` and `sort`, builds the CSV in the background and emails it to the requesting user (`204`).\n\nRelated: [`GET /v3/contacts/activity`](/v2/ref#/operations/v3.contactsActivity) returns a contact's recent calls and SMS; [`GET /v2/phonebook/name-by-number`](/v2/ref#/operations/v2.sharedContactNameByNumber) resolves a number to a shared contact's name (cached for 24 hours); the inbound call log carries the contact id and name of each call.\n\n## Roles and access\n\n- Every endpoint above is open to any authenticated user of the account. Handing one user's private contacts to another before that user is deleted is done in the portal when the user is removed.\n- Private contacts of other users are hidden from the list, the export and `show` (which answers `404`). An API key sees the contacts its creator sees.\n\n## Pitfalls\n\n- Phone numbers are stored as digits with the country code and no `+` (`353861234567`), and are returned that way in `phones[].phone_number`. Send them in international format (`+353861234567` or `00353\u2026`) when creating or updating; a national number such as `0861234567` fails validation. The importer is more lenient and reads numbers in the user's country.\n- There is no duplicate detection: creating or importing the same person twice gives two contacts.\n- `PUT` is a full replacement. Omitting `email`, `comments` or the address clears them; omitting `private` makes the contact shared.\n- `perPage` differs: `/v3/contacts` accepts 1\u2013500, `/v2/contacts` only `15`, `50`, `100` or `-1` (\"all\", capped at 1000 rows, `422` above that).\n- Names imported from files are HTML-encoded (`O&#039;Brien`); decode them client-side.\n- A row is imported only if it has a name **and** at least one valid number; email-only rows are skipped, unlike manual creation. `POST /v3/contacts/import` skips the header row, `POST /v2/phonebook/import` does not.\n- The export CSV holds only the first mobile and the first landline of each contact."
        },
        {
            "name": "Contacts / Import"
        },
        {
            "name": "Contacts / Groups"
        },
        {
            "name": "Contacts / Organizations"
        },
        {
            "name": "Contacts / Activity"
        },
        {
            "name": "Webhooks",
            "description": "Webhooks push events from your NUACOM account to a URL you choose, as they happen: a call ringing, answered or ended, a note or tag on a call, a key pressed in an IVR menu, a voicemail, an inbound or outbound message, the delivery result of an SMS. You register the URL once per event type and NUACOM sends a JSON `POST` for every matching event on the account, so you never poll the call log. This group holds the three subscription endpoints: register, list and delete. The payloads point back into [Call Logs](/v2/docs/groups/call-logs) and [Conversations](/v2/docs/groups/conversations), where you fetch the full record; the [Integrations](/v2/docs/groups/integrations) guide shows where webhooks sit in a complete integration.\n\n## Workflow (what the portal does)\n\nThe portal does not manage subscriptions: you register them from your own code, as automation tools such as n8n do through the same endpoints.\n\n1. **Register**: [`POST /v2/webhook-subscriptions`](/v2/ref#/operations/webhook-subscriptions.webhook-subscriptions.store) with `type` (one event type from the table below, spelled exactly) and `url` (an absolute URL with a scheme, at most 500 characters; `http://` passes validation, but use `https://`). Answers `201` with `{\"id\": 1234}`. When the account already has an active subscription for the same `url` **and** `type`, nothing is created and the answer is `200` with the existing `{\"id\": \u2026}`; the same URL with another `type` is a new subscription with its own id. A wrong type or URL answers `422` with `{\"errors\": {\"type\": [\"The selected type is invalid.\"]}}` or `{\"errors\": {\"url\": [\"The url field must be a valid URL.\"]}}`.\n2. **Receive**: NUACOM posts to the URL for every event of that type on the account (see [Delivery](#delivery)). Answer `2xx` within 5 seconds and do the work afterwards.\n3. **List**: [`GET /v2/webhook-subscriptions`](/v2/ref#/operations/webhook-subscriptions.webhook-subscriptions.index) answers `{\"data\": [{\"id\": 1234, \"type\": \"call_event\", \"url\": \"https://\u2026\"}]}`: every subscription of the account, whoever registered it.\n4. **Delete**: [`DELETE /v2/webhook-subscriptions/{webhookSubscription}`](/v2/ref#/operations/webhook-subscriptions.webhook-subscriptions.destroy) answers `204` and deliveries stop at once. An id that does not exist, or belongs to another account, answers `404` with `{\"message\": \"Not Found.\"}`.\n\n```bash\n# Register: 201 with the new id, 200 with the existing id if already registered\ncurl -X POST https://api.api-nuacom.com/v2/webhook-subscriptions \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"type\":\"call_event\",\"url\":\"https://example.com/hooks/nuacom/8f3a1c0d9e\"}'\n# \u2192 {\"id\":1234}\n\n# List\ncurl https://api.api-nuacom.com/v2/webhook-subscriptions \\\n  -H 'Authorization: Bearer YOUR_API_KEY'\n# \u2192 {\"data\":[{\"id\":1234,\"type\":\"call_event\",\"url\":\"https://example.com/hooks/nuacom/8f3a1c0d9e\"}]}\n\n# Delete\ncurl -X DELETE https://api.api-nuacom.com/v2/webhook-subscriptions/1234 \\\n  -H 'Authorization: Bearer YOUR_API_KEY'\n# \u2192 204\n```\n\n## Event types\n\n| `type` | Sent when | Payload |\n|---|---|---|\n| `call_event` | A call ends, whatever its direction or outcome. The usual choice. | Call |\n| `inbound_call_event` | An inbound call ends. | Call |\n| `inbound_missed_call_event` | An inbound call ends unanswered. | Call, no recording link |\n| `outbound_call_event` | An outbound call ends. | Call |\n| `outbound_answered_call_event` | An outbound call that was answered ends. | Call |\n| `call_missed` | A call ends unanswered, inbound or outbound. | Call, no recording link |\n| `call_initiated` | A call starts ringing. | Call, raw form |\n| `call_answered` | A call is answered (connected, not yet ended). | Call, no recording link |\n| `call_event_listeners` | Every stage of every call: ringing, connected, ended. The most deliveries. | Call |\n| `call_updated` | A note or tag on a call changed, or the AI analysis of a call completed. | Call updated |\n| `note_added` | A note is added to a call. | Note |\n| `note_updated` | A note on a call is edited. | Note |\n| `note_removed` | A note is deleted from a call. | Note, id only |\n| `tag_added` | A tag is assigned to a call (not when it is already on it). | Tag |\n| `tag_removed` | A tag is removed from a call, one event per call. | Tag, id only |\n| `ivr_option_selected` | A caller presses a key in an IVR menu. | IVR |\n| `voicemail_received` | A voicemail reaches an extension's mailbox. | Voicemail |\n| `message_received` | An inbound SMS, WhatsApp or MMS message arrives. | Message |\n| `message_sent` | An outbound message is handed to the carrier. | Message |\n| `sms_delivery_status` | An SMS you sent is delivered or fails. | SMS delivery |\n\n## Payloads\n\nEvery delivery is one JSON object. Booleans in call events are strings, shown below as sent; everything else is typed as shown.\n\n### Call events\n\nThe nine call types share one shape, built from the phone system's event at the moment it fires:\n\n```json\n{\n  \"call_id\": \"srv01-core1-1761660245.12345\",\n  \"call_at\": \"2026-10-28T14:04:05Z\",\n  \"started_at_unix\": \"1761660245\",\n  \"duration\": 95,\n  \"total_duration\": 112,\n  \"call_caller_number\": \"00353861234567\",\n  \"call_caller_number_local\": \"0861234567\",\n  \"call_callee_number\": \"0035315540200\",\n  \"call_callee_number_local\": \"015540200\",\n  \"call_direction\": \"inbound\",\n  \"call_status\": \"completed\",\n  \"call_terminated\": \"1\",\n  \"call_answered\": \"true\",\n  \"agent_hangup_request\": \"\",\n  \"cause\": \"NORMAL_CLEARING\",\n  \"call_transfered\": \"0\",\n  \"call_answered_by\": 101,\n  \"call_initiated_by\": null,\n  \"call_in_queue\": \"Queue 4 Sales\",\n  \"call_channel_local\": \"0211234567\",\n  \"agent_status\": \"answered\",\n  \"customer_status\": \"connected\",\n  \"sync_specific_contact_id\": null,\n  \"notes\": \"Asked for a callback | Sent the brochure\",\n  \"tags\": \"Sales, Callback\",\n  \"hook_id\": 1234,\n  \"id\": \"srv01-core1-1761660245.12345\",\n  \"recording_link\": \"https://api.api-nuacom.com/integration/recording?id=srv01-core1-1761660245.12345&integration=&client_id=IE-00123&token=\u2026\"\n}\n```\n\n- `call_id` is the telephony id of the call, the `call_id` the call log shows; every leg of a transferred or queued call shares it. `id` repeats it (kept for older integrations). `hook_id` is the subscription that produced the delivery: call payloads carry no `event_type`.\n- `call_direction` is `inbound`, `outbound` or `internal`. `call_status` is `ringing`, then `connected` once answered, then a final value such as `completed`, `busy`, `failed` or `no answer` once `call_terminated` is `\"1\"`. `call_terminated` and `agent_hangup_request` are `\"1\"` or `\"\"`; `call_answered` is `\"true\"` or `\"false\"`.\n- `call_caller_number` and `call_callee_number` are in international format with a `00` prefix when the number is valid for the account's country, otherwise as reported (an extension, an anonymous caller). The `_local` variants are the national form as reported.\n- `call_answered_by` and `call_initiated_by` are the extension that answered or placed the call, as an integer, or `null`.\n- `call_in_queue` is `Queue <number> <name>` when the call went through a queue (the raw identifier when the queue cannot be matched), otherwise `null` or empty.\n- `duration` and `total_duration` are `null` until the call ends, then the connected seconds and the total seconds including ringing (the call log's `billsec` and `duration`).\n- `notes` is every note on the call joined with ` | `, `tags` every tag name joined with `, `; both `null` when there are none.\n- `cause`, `agent_status`, `customer_status`, `call_channel_local`, `call_transfered` and `started_at_unix` are passed through from the phone system (`call_transfered` is `\"1\"` once the call has been transferred, `\"0\"` otherwise). `sync_specific_contact_id` is reserved for NUACOM's own CRM integrations.\n- `recording_link` is present only on ended-call events (`call_event`, `inbound_call_event`, `outbound_call_event`, `outbound_answered_call_event`, and `call_event_listeners` once the call ended) and only when the answering (inbound) or calling (outbound) extension has recording enabled for that direction. It downloads the recording with no header: the link carries its own token, so anyone holding it can fetch the audio. Recordings expire (see [Call Logs](/v2/docs/groups/call-logs)).\n\n`call_initiated` is sent in raw form: no `id`, numbers as reported by the phone system, `call_answered` as `\"1\"` or `\"\"`, `duration` and `total_duration` `null`.\n\n### Notes and tags\n\n```json\n{\"call_id\": \"srv01-core1-1761660245.12345\", \"event_type\": \"note_added\", \"note\": {\"id\": 822528, \"value\": \"Asked for a callback\"}}\n```\n\n`note_updated` has the same shape; `note_removed` carries only `note.id`.\n\n```json\n{\"call_id\": \"srv01-core1-1761660245.12345\", \"event_type\": \"tag_added\", \"tag\": {\"id\": 56, \"value\": \"Sales\", \"color\": \"#ff9f1a\"}}\n```\n\n`tag.id` is the catalogue tag id from [`GET /v3/call-tags`](/v2/ref#/operations/v3.call-tags.index); `tag_removed` carries only `tag.id`. Every note and tag event is followed by a `call_updated` event.\n\n### Call updated\n\n```json\n{\"event_type\": \"call_updated\", \"call_id\": \"srv01-core1-1761660245.12345\", \"call_direction\": \"inbound\", \"update_type\": \"notes\"}\n```\n\n`update_type` is `notes`, `tags` or `ai_analysis` (the transcription and keyword analysis of the call completed). `call_direction` is the call log's direction, or `\"\"` when the call is not in the log yet. The payload carries none of the new data: fetch the notes, tags or transcript afterwards.\n\n### IVR\n\n```json\n{\"event_type\": \"ivr_option_selected\", \"call_id\": \"srv01-core1-1761660245.12345\", \"caller_number\": \"353861234567\", \"ivr_id\": \"3\", \"option_selected\": \"2\"}\n```\n\n`ivr_id` is the menu id used by [IVR](/v2/docs/groups/ivr) and `option_selected` the key pressed, both strings. `caller_number` is passed through as the phone system reports it.\n\n### Voicemail\n\n```json\n{\"event_type\": \"voicemail_received\", \"extension\": \"101\", \"msgnum\": 3}\n```\n\nThe payload announces the arrival only: no caller, no audio. `msgnum` is the message's index in that mailbox and shifts as older messages are deleted, so it is not a stable id, and no endpoint returns an individual voicemail.\n\n### Messages\n\n```json\n{\"event_type\": \"message_received\", \"message_id\": \"01K8QF3M8Q7Z2N4P6R8T0V2X4Y\", \"channel\": \"sms\", \"sender_number\": \"353861234567\", \"receiver_number\": \"35315540200\", \"content\": \"Hi, can you call me back?\", \"created_at\": \"2026-10-28T14:04:05+00:00\"}\n```\n\n```json\n{\"event_type\": \"message_sent\", \"message_id\": \"01K8QF4A2B6C8D0E2F4G6H8J0K\", \"channel\": \"sms\", \"sender_number\": \"NUACOM\", \"receiver_number\": \"353861234567\", \"content\": \"Your appointment is confirmed.\", \"status\": \"sent\", \"created_at\": \"2026-10-28T14:04:05+00:00\"}\n```\n\n`channel` is `sms`, `whatsapp` or `mms`. On `message_received`, `sender_number` is the contact and `receiver_number` the number or sender name they wrote to; on `message_sent` it is the other way round. Numbers are passed through as stored on the conversation. `message_id` is the id for [`GET /v2/conversations/messages/{messageId}`](/v2/ref#/operations/v2.getMessageInfo); `created_at` is ISO 8601. `message_sent` fires once per message, when it is handed to the carrier, and `status` is always `sent`; for US 10DLC campaigns it arrives once the carrier has assigned the sending number.\n\n### SMS delivery status\n\n```json\n{\"error_code\": \"\", \"error_description\": \"\", \"status\": 2, \"status_string\": \"DELIVERY_SUCCESS\", \"reference\": \"appointment-123\", \"number\": \"00353861234567\"}\n```\n\nSent for SMS only, once the carrier reports a final outcome: `status` is `2` (delivered) or `4` (failed); intermediate statuses are not sent. `status_string` is `DELIVERY_SUCCESS` or `DELIVERY_FAILURE` and `error_code` / `error_description` are the carrier's; on some carriers all three are `null`, so branch on `status`. `reference` is the `to[].reference` you gave [`POST /v2/sms/send`](/v2/ref#/operations/sms.send); without one it falls back to a message identifier (which one depends on the carrier), so always send a reference. `number` is the recipient in international format with a `00` prefix. This is the one payload without `event_type`. WhatsApp delivery has no webhook: read it with [`POST /v2/conversations/messages/{message}/statuses`](/v2/ref#/operations/v2.getMessageStatuses).\n\n## Delivery\n\n```mermaid\nsequenceDiagram\n    participant Event as Event on your account\n    participant NUACOM as NUACOM\n    participant You as Your registered URL\n\n    Event->>NUACOM: call ends / note or tag changes / message arrives / \u2026\n    NUACOM->>You: POST matching event, Content-Type: application/json\n    alt answers 2xx within 5 seconds\n        You-->>NUACOM: 2xx\n        Note over NUACOM,You: delivery recorded, nothing more sent\n    else times out, non-2xx, or no answer\n        You-->>NUACOM: timeout / error / nothing\n        Note over NUACOM,You: never retried; response body ignored either way\n    end\n```\n\n- One `POST` per event and per matching subscription, with `Content-Type: application/json` and the JSON object as the body. There is no signature and no authentication header.\n- The request times out after 5 seconds. Whatever your endpoint answers, any status or none, the event is sent once and never retried, and your response body is ignored. NUACOM logs each delivery with your response status, body and headers, which support can check with you.\n- Deliveries are queued and asynchronous: they usually arrive within seconds, and the events of one call are not guaranteed to arrive in order. Read `call_status` and `call_terminated`, not the arrival order.\n- Protect the endpoint with a secret in the URL itself, a long random path segment or query parameter, and reject requests without it: the URL is stored and sent verbatim. Everyone with API access to the account can read it in the list, so treat it like the API key.\n\n> [!WARNING]\n> Deliveries carry no signature and are never retried. Answer `2xx` within 5 seconds, store the payload first and process it afterwards, and treat a missing event as something to reconcile from the call log, not as something that will arrive later.\n- Certificates: for call, `call_updated`, IVR, voicemail and message events the certificate of your endpoint is not verified; for note, tag and SMS delivery events it is. Use a certificate from a public CA so every family gets through.\n- Automatic deactivation: a subscription whose URL contains `n8n` is deactivated when the endpoint answers `404` (n8n drops a workflow's webhook without unsubscribing). It is not deleted: it stays in the list, and registering the same URL and type again creates a new subscription (`201`). No other failure deactivates anything.\n- What the receiver must do: answer `2xx` first and process later, and be idempotent. One call produces several events (`call_initiated`, `call_answered` or `call_missed`, the ended event, `call_updated`), every leg of a transferred or queued call shares the `call_id`, and the same ended event can occasionally be delivered twice (for example after a parked call is retrieved; the repeat may report `call_answered` as `\"false\"`). Key your records on `call_id` plus the stage (`call_status`, `call_terminated`) and let the call log settle the final state.\n\n## After the event\n\n- [`GET /v2/call-logs/{callId}`](/v2/ref#/operations/v2.getCallLogUnique) with the payload's `call_id` returns every leg of the call, each with its own `call_unique_id`. The row may not exist yet when the ended event arrives; retry after a moment.\n- Recording: [`GET /v3/call-recording/{callId}`](/v2/ref#/operations/v3.callRecording) with `call_id` (MP3 by default), or the `recording_link` of the payload.\n- Transcript: [`GET /v2/speech-to-text/{callUniqueId}`](/v2/ref#/operations/speechToText.getCallSTT) with a leg's `call_unique_id`, once `call_updated` with `update_type` `ai_analysis` has arrived.\n- Notes and tags: [`GET /v2/call-notes?callIDs[]=\u2026`](/v2/ref#/operations/callLog.callNotes) and [`GET /v2/call-tags?callIDs[]=\u2026`](/v2/ref#/operations/callLog.callTags); write back with [`POST /v3/call-notes`](/v2/ref#/operations/v3.call-notes.store) and [`POST /v2/add-call-tag`](/v2/ref#/operations/v2.addCallTag), which themselves fire `note_added` or `tag_added` and then `call_updated`.\n- Messages: fetch with `GET /v2/conversations/messages/{messageId}`, reply with [`POST /v2/conversations/{conversation}/messages`](/v2/ref#/operations/conversation.addMessage); see [Conversations](/v2/docs/groups/conversations).\n\n## Testing your receiver\n\n- Use a URL reachable from the internet over HTTPS. `localhost` and office-only addresses never receive anything, and nothing in the API tells you so.\n- A request-inspection (\"request bin\") service gives you a disposable URL that shows every delivery raw. Register it for `call_event_listeners`, place one call to the account and you see ringing, connected and ended in sequence; register `message_received` and text one of your numbers.\n- Registering the same URL and type twice is harmless: `200` with the same id. Several types may share one URL; `hook_id` (call events) or `event_type` (the others) tells them apart.\n- There is no test-event endpoint: trigger real events. Delete the disposable subscription when you are done.\n\n## Roles and access\n\n- Any authenticated user of the account, with an API key or a session token, can register, list and delete subscriptions. There is no admin requirement; without a token the endpoints answer `401`.\n- Subscriptions belong to the account, not to the user or key that created them: every user sees the same list and can delete any entry. An id from another account answers `404`.\n- Deliveries are account-wide: a subscription receives every matching event of the account, regardless of the call-log visibility of the user who registered it. The recording link follows the extension's recording settings, not the user's recording access.\n- What arrives follows what the account uses (an account without the WhatsApp add-on has no WhatsApp messages, `ai_analysis` updates need call transcription).\n\n## Pitfalls\n\n- Call-event booleans are strings: `\"1\"` / `\"\"` for `call_terminated` and `agent_hangup_request`, `\"true\"` / `\"false\"` for `call_answered` (`\"1\"` / `\"\"` on `call_initiated`). `status` in `sms_delivery_status` is an integer. Never test for JSON `true`.\n- Call payloads have no `event_type`; `sms_delivery_status` has neither `event_type` nor `hook_id`. Give each family its own URL, or route on the keys.\n- `call_event_listeners` delivers at least three times per call, `call_event` once. The same URL subscribed to overlapping types (`call_event` and `inbound_call_event`, `call_missed` and `inbound_missed_call_event`) receives the same event once per subscription.\n- `call_missed` includes outbound calls nobody answered; `inbound_missed_call_event` is inbound only. `call_event`, `call_initiated`, `call_answered`, `call_missed` and `call_event_listeners` include internal extension-to-extension calls.\n- `tag_added` is not sent when the tag is already on the call. `call_updated` fires after every note and tag change whether or not you subscribed to those types.\n- Number formats differ by family: `00`-prefixed international in call events and `sms_delivery_status`, as stored in message events, as reported in `ivr_option_selected`.\n- Validation checks the shape of the URL, not that it answers: a typo registers fine and simply never receives anything.\n- The list includes subscriptions that were deactivated automatically and does not say which. If an n8n URL stops receiving, delete it and register again.\n- `message_sent` means handed to the carrier, not delivered. Delivery outcomes come as `sms_delivery_status`, for SMS only.\n- `recording_link` gives access to the audio without any header, and the subscription URL carries your secret. Keep payloads, URLs and logs confidential."
        },
        {
            "name": "Top Up",
            "description": "Top-ups add prepaid credit to the account by charging one of its saved cards. There are three kinds: **balance**, the money that pays for calls (and, on pre-pay accounts, for messages); **call credit**, the older name of the same balance; and **SMS credits**, bought in packages. Each kind has a one-off top-up, a `calculate` preview of the price with VAT, and an automatic top-up configuration that NUACOM charges when the balance drops to a limit. The cards come from [Payments](/v2/docs/groups/payments); the SMS packages and what the credits buy are in [Conversations / SMS](/v2/docs/groups/conversations-sms).\n\n## Workflow (what the portal does)\n\nThe portal's **Balance Top Up** page:\n\n1. **Preview the price**: [`POST /v2/top-up/balance/calculate`](/v2/ref#/operations/topUp.calculateBalanceTopUp) with `amount`, an integer from 1 to 9999 in the account's billing currency (`billing.billing_currency` on the account info), answers `{\"amount\": 20.0, \"vat_rate\": 0.23, \"vat\": 4.6, \"total\": 24.6}`. `vat_rate` is the rate in force today for the account's VAT type (`0` when none applies); `vat` and `total` are rounded to two decimals. The portal recalculates as the amount changes.\n2. **Charge the card**: [`POST /v2/top-up/balance`](/v2/ref#/operations/topUp.balanceTopUp) with the same `amount` and `payment_method`, the `id` of one of the account's cards from [`GET /v2/payments`](/v2/ref#/operations/payments.index). `total` is charged to the card at once, without the cardholder present, and the answer is `204` with no body. The balance is credited shortly after, when Stripe's confirmation reaches NUACOM, and a receipt is emailed to the account's billing address.\n3. **Watch the balance**: the portal polls the balance until it changes. Read `billing.account_balance` on [`GET /v2/account_info`](/v2/ref#/operations/account.view).\n4. **Automatic top-up**: [`GET /v2/top-up/auto/balance`](/v2/ref#/operations/topUp.getBalanceAutoTopUp) returns the configuration, or `204` when there is none. [`POST /v2/top-up/auto/balance`](/v2/ref#/operations/topUp.saveBalanceAutoTopUp) with `amount` (1\u20139999), `balance_limit` (an integer of at least 1) and `payment_method` creates or replaces it and answers `204`: whenever the balance is at or below `balance_limit`, NUACOM charges `amount` plus VAT to that card. [`DELETE /v2/top-up/auto/balance`](/v2/ref#/operations/topUp.deleteBalanceAutoTopUp) switches it off (`204`, also when nothing was configured).\n\nThe **call credit** endpoints, [`POST /v2/top-up/call/calculate`](/v2/ref#/operations/topUp.calculateCallTopUp), [`POST /v2/top-up/call`](/v2/ref#/operations/topUp.callTopUp) and the [`GET`](/v2/ref#/operations/topUp.getCallAutoTopUp), [`POST`](/v2/ref#/operations/topUp.saveCallAutoTopUp) and [`DELETE /v2/top-up/auto/call`](/v2/ref#/operations/topUp.deleteCallAutoTopUp) configuration, take the same inputs (`credit_limit` in place of `balance_limit`), and a top-up through them credits the same balance; they are the older Call Credit Top Up page. Use the balance endpoints for new work.\n\nThe portal's **SMS Top Up** page:\n\n1. **Pick a package**: [`GET /v2/sms/packages`](/v2/ref#/operations/smsPackages.index) lists them with `id`, `amount` of credits and `cost`, at the account's own prices where NUACOM has agreed some.\n2. **Preview**: [`POST /v2/top-up/sms/calculate`](/v2/ref#/operations/topUp.calculateSmsTopUp) with `package_id` quotes the package's `cost` as `amount`, with `vat_rate`, `vat` and `total`.\n3. **Charge**: [`POST /v2/top-up/sms`](/v2/ref#/operations/topUp.smsTopUp) with `package_id` and `payment_method` charges `total` to the card (`204`). The credits are added when the confirmation arrives and show in `billing.sms_balance` on the account info; they stay valid for one year from the purchase.\n4. **Automatic top-up**: [`GET`](/v2/ref#/operations/topUp.getSmsAutoTopUp), [`POST /v2/top-up/auto/sms`](/v2/ref#/operations/topUp.saveSmsAutoTopUp) (`package_id`, `credit_limit`, `payment_method`) and [`DELETE /v2/top-up/auto/sms`](/v2/ref#/operations/topUp.deleteSmsAutoTopUp) store an SMS configuration. Read *Pitfalls* before relying on it.\n\n```bash\ncurl -X POST https://api.api-nuacom.com/v2/top-up/balance \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"amount\": 20, \"payment_method\": \"pm_1AbCdEfGhIjKlMnOpQrStUvW\"}'\n```\n\n## Reading a configuration\n\nAn automatic top-up configuration carries `id`, `account_id`, `user_id` (the admin who saved it), `payment_type` (`2` for a Stripe card, `1` for a card held with NUACOM's earlier card records), `payment_method` (the `pm_\u2026` id, or the legacy card reference), `amount` on the balance and call kinds or `package_id` on the SMS kind, `balance_limit` or `credit_limit`, and `set_time`, when it was last saved.\n\n## How the automatic top-up runs\n\n```mermaid\nflowchart TD\n    trigger[\"Call ends, or SMS/MMS/WhatsApp message sent (scheduled or bulk included)\"] --> compare{\"balance <= balance_limit?\"}\n    compare -- \"no\" --> skip[\"No charge\"]\n    compare -- \"yes\" --> charge[\"Charge amount + VAT to saved card\"]\n    charge -- \"success\" --> credited[\"Balance credited\"]\n    charge -- \"card reports no longer usable\" --> removed[\"Configuration removed at once\"]\n    charge -- \"declined\" --> retry1[\"Retry 1, 5 minutes later<br/>billing address emailed\"]\n    retry1 -- \"success\" --> credited\n    retry1 -- \"declined\" --> retry2[\"Retry 2, 5 minutes later\"]\n    retry2 -- \"success\" --> credited\n    retry2 -- \"declined\" --> removed\n```\n\n- It runs after a call ends and after an SMS, MMS or WhatsApp message is sent, scheduled and bulk sends included. It reads the **balance** configuration, compares the account balance with `balance_limit` and, at or below it, charges `amount` plus VAT to the saved card without the cardholder present. One attempt runs at a time.\n- A declined card is retried twice, five minutes apart. The billing address is emailed about the failure (a card that needs 3-D Secure gets an email asking to authenticate it). After the third failure the configuration is removed, and saving it again is what re-enables it. A card that Stripe reports as no longer usable is not retried: the configuration is removed at the first failure.\n\n## Roles and access\n\n- Every endpoint in this group needs an **account admin**: the user behind the token must be an admin of the account, or the answer is `403` with the body `\"Forbidden\"`.\n- The API does not look at the account's billing type: it accepts a top-up from a bill-pay account as readily as from a pre-pay one. Which pages the portal shows is the portal's decision.\n- The ISO dates option (per account) switches `set_time` to ISO 8601 in the requested timezone.\n\n## Pitfalls\n\n- `204` means the card was charged, not that the balance has moved. The credit lands when Stripe's confirmation arrives, shortly after; poll the account info rather than repeating the top-up.\n- Two payment failures answer `400` with an `error_code`: `PAYMENT-DECLINED` (`message` carries the card provider's reason) and `PAYMENT-INCOMPLETE` (the payment needs the cardholder; `incomplete_payment.client_secret` identifies it, and the portal completes it with Stripe.js in the browser). Nothing is credited until the payment succeeds; a completed `PAYMENT-INCOMPLETE` payment is credited through the same confirmation. See [Errors](/v2/docs/errors).\n- `payment_method` must be one of the account's cards, else `422` with `errors.payment_method` `\"Payment method does not exists\"`. The three `auto` save endpoints also accept a saved card reference from an earlier card record, but the automatic top-up this API runs charges Stripe cards only: save a `pm_\u2026` id.\n- Only the **balance** configuration drives the automatic top-up that runs after calls and messages. The call and SMS configurations are stored and returned for the older portal pages, but no charge is made from them through this API.\n- `amount` is an integer: `20.50` is refused with `422`, and `9999` is the maximum per top-up.\n- A card referenced by any of the three configurations cannot be deleted from [Payments](/v2/docs/groups/payments) until the configuration points at another card.\n- `GET /v2/top-up/auto/\u2026` answers `204`, not `404` or `null`, when nothing is configured; `DELETE` answers `204` even then.\n- SMS credits expire one year after purchase."
        },
        {
            "name": "Addons"
        },
        {
            "name": "Payments",
            "description": "Payments holds the account's saved cards and the operations that charge them outside a top-up: the card list, choosing and checking the default card, deleting one, paying the outstanding balance, and the VAT rates. A card saved here is the `payment_method` that [Top Up](/v2/docs/groups/top-up) charges. Cards are added in the NUACOM portal: the browser hands the card details to Stripe, which returns a payment method id, and that id is all NUACOM keeps. Card numbers never pass through the API.\n\n## Workflow (what the portal does)\n\nThe portal's **Billing \u2192 Payment Methods** page:\n\n1. **List the cards**: [`GET /v2/payments`](/v2/ref#/operations/payments.index) answers an array, empty until a first card is stored: `id` (`pm_\u2026`), `brand` in upper case (`VISA`), `country`, `exp_month`, `exp_year`, `last4`, `three_d_secure_usage`, `is_default`, `created_at` and `meta`. At most 24 cards are returned.\n2. **Add a card** in the portal, under **Billing \u2192 Payment Methods**. The card form runs on Stripe.js with the portal's Stripe key and any 3-D Secure challenge; the API has no endpoint for it. The new card then appears in the list above, with `is_default` set when it was saved as the default.\n3. **Change the default**: [`POST /v2/payments/set-method-as-default`](/v2/ref#/operations/payments.makeMethodDefault) with `payment_method` answers `true` when the default changed and `false` when that card already was the default.\n4. **Delete a card**: [`DELETE /v2/payments/delete-method?payment_method=pm_\u2026`](/v2/ref#/operations/payments.deleteMethod) detaches it from the account and answers `true`. Deleting the default card leaves the account without one.\n5. **Check the default**, as the pages that charge it do: [`GET /v2/payments/check-default-payment`](/v2/ref#/operations/payments.checkDefaultPayment) answers `true` or `false`; [`GET /v2/payments/default-payment`](/v2/ref#/operations/payments.defaultPayment) describes it as `{\"processor\": 2, \"id\": \"pm_\u2026\", \"brand\": \"visa\", \"last_four\": \"4242\"}` (`processor` `2` is Stripe, `1` an earlier card record), `204` when the account has a Stripe customer record but no default card, `404` when it has no default card at all.\n6. **Pay what is owed**: [`POST /v2/payments/pay-outstanding-amount`](/v2/ref#/operations/payments.payOutstandingAmount) charges the account's outstanding balance, the invoiced amounts not yet settled, to the default card and answers `true`. Both inputs are optional: `amount` (1\u20139999.9999) to pay part of the balance, `payment_method` to use another card, required when the account has no default. After a successful payment NUACOM re-enables calling on an account that was suspended for non-payment.\n7. **VAT rates**: [`GET /v2/vat-rate`](/v2/ref#/operations/vatRate.index) lists the VAT rates in force today, one row per VAT type: `vat_type`, `vat_rate` (`0.23`) and `description`. The top-up previews quote the rate of the account's own type.\n\n```bash\ncurl -X POST https://api.api-nuacom.com/v2/payments/pay-outstanding-amount \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"amount\": 50}'\n# \u2192 true\n```\n\n## Roles and access\n\n- Everything under `/v2/payments` needs an **account admin**; any other user gets `403` with the body `\"Forbidden\"`. `GET /v2/vat-rate` is open to any authenticated user.\n- The ISO dates option (per account) switches a card's `created_at` to ISO 8601 in the requested timezone; without it the value is `Y-m-d H:i:s` in the account's timezone.\n\n## Pitfalls\n\n- Four endpoints answer a bare JSON boolean, not an object: set default, delete, check default and pay outstanding. Parse accordingly.\n- Cards are added in the NUACOM portal only; the API lists, defaults, deletes and charges the cards it has.\n- The domain checks in this group answer `422` with `errors` only, no `message`: `payment_method_id` (unknown card on delete), `payment_method` (the card is used by an automatic top-up; point the top-up at another card first, see [Top Up](/v2/docs/groups/top-up)), `balance` (nothing outstanding), `default_payment_method` (no card to charge), `declined` (the card provider's reason) and `incomplete_payment` (`message`, `client_secret`, `payment_method`, `payment_method_types`).\n- `pay-outstanding-amount` reports a declined card and a payment that needs the cardholder as `422` under `errors`, unlike the top-ups, which answer `400` with an `error_code`; see [Errors](/v2/docs/errors).\n- An outstanding balance below `1.00` counts as nothing to pay. An `amount` above the outstanding balance is capped at the balance: the charge is never more than what is owed.\n- `brand` is upper case in the list and as Stripe reports it (`visa`) in `default-payment`.\n- The default-card checks fall back to the earlier card records when the account has no Stripe customer record; with no record there either, `check-default-payment` answers `false` and `default-payment` `404`."
        },
        {
            "name": "Subscriptions"
        },
        {
            "name": "Data Retention",
            "description": "Data retention is how long NUACOM keeps five kinds of account data \u2014 call logs, SMS history, call recordings, fax data and voicemail messages \u2014 before they are deleted. The account holds one retention interval per type, each bounded by a limit set by the data retention add-on it has. This group holds the settings (read and save), the add-on switch, the two endpoints that resolve a pending reduction \u2014 activate it now or cancel it. The data the policy acts on is what [Call Logs](/v2/docs/groups/call-logs), [Call Recording](/v2/docs/groups/call-recording) and [Fax](/v2/docs/groups/fax) serve.\n\n## Workflow (what the portal does)\n\n1. **Read the policy**: [`GET /v2/data-retention/settings`](/v2/ref#/operations/data-retention.settings.index) answers one object per type \u2014 `call_logs`, `sms_history`, `call_recording`, `fax_data`, `voicemail` \u2014 with `current` (the interval in force), `pending` (a shorter interval waiting for its grace period, otherwise `null`) and `limit` (the longest the account's add-on allows), all as ISO 8601 durations (`P1Y`, `P6M`, `P30D`). Around them: `mailboxes`, the voicemail intervals of the mailboxes that have their own, keyed by mailbox number (`[]` when none has one); `extensions_count`, the number of extensions on the account, which is the quantity an add-on is billed for; `is_blocked`, `true` while a change is pending; `early_retention_alert`, always `false`; and `updated_at`, when the pending change was made, `null` without one. On an account that has never saved settings every `current` is `null`.\n2. **Choose the add-on**: [`POST /v2/data-retention/change-addon`](/v2/ref#/operations/data-retention.change-addon) with `code`: `none`, `3y`, `7y` or `10y`. It cancels the current data retention add-on, activates the requested one and bills the difference as described in [Limits and billing](#limits-and-billing). A current interval longer than a new limit is scheduled down to it: the cut value becomes `pending` and follows step 3, and the add-on you left is remembered for 7 days so that step 5 can bring it back. `204`.\n3. **Save the intervals**: [`POST /v2/data-retention/settings`](/v2/ref#/operations/data-retention.settings.store) with `call_logs_retention_interval`, `sms_history_retention_interval`, `call_recording_retention_interval` and `fax_data_retention_interval` \u2014 ISO 8601 durations, each at most its `limit` \u2014 and `voicemail_retention_interval`, an object whose key `\"null\"` carries the account-wide voicemail interval (at most `P1M`, read as 30 days) and whose other keys are mailbox numbers with an interval of their own, which may not be longer than the account-wide one ([`GET /v2/voicemail/mailbox_numbers`](/v2/ref#/operations/voicemail.mailboxNumbers) lists the numbers). The portal sends all five values every time; do the same (see Pitfalls). The answer is `204` either way, but what happens depends on the direction:\n   - every value equal to or longer than today's: the new values are in force at once;\n   - any value shorter: every account-wide value in the request becomes `pending` and the current ones stay in force for a grace period of 7 days, after which a daily run at 06:10 Irish time applies them. An email announcing the new policy goes to the account's primary contact, with the account admins in copy, when the change is made and again when it is applied;\n   - mailbox values are saved at once, whichever the direction.\n4. **Activate now**: [`PATCH /v2/data-retention/settings/activate-now`](/v2/ref#/operations/data-retention.activate-now) makes the pending values current without waiting; mailbox intervals longer than the new account-wide voicemail interval are cut down to it. No email is sent. `204`.\n5. **Cancel**: [`PATCH /v2/data-retention/settings/cancel`](/v2/ref#/operations/data-retention.cancel) discards the pending values; the current ones stay. When the pending change came from an add-on change in the last 7 days, the add-on you had before is activated again, charged from the next month. `204`.\n\n```bash\ncurl -X POST 'https://api.api-nuacom.com/v2/data-retention/settings' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"call_logs_retention_interval\": \"P1Y\",\n    \"sms_history_retention_interval\": \"P1Y\",\n    \"call_recording_retention_interval\": \"P3M\",\n    \"fax_data_retention_interval\": \"P6M\",\n    \"voicemail_retention_interval\": {\"null\": \"P1M\", \"100\": \"P14D\"}\n  }'\n```\n\nThe recording interval was shortened, so the settings now read:\n\n```json\n{\n  \"call_logs\": {\"pending\": \"P1Y\", \"current\": \"P1Y\", \"limit\": \"P1Y\"},\n  \"sms_history\": {\"pending\": \"P1Y\", \"current\": \"P1Y\", \"limit\": \"P1Y\"},\n  \"call_recording\": {\"pending\": \"P3M\", \"current\": \"P6M\", \"limit\": \"P6M\"},\n  \"fax_data\": {\"pending\": \"P6M\", \"current\": \"P6M\", \"limit\": \"P6M\"},\n  \"voicemail\": {\"pending\": \"P1M\", \"current\": \"P1M\", \"limit\": \"P1M\"},\n  \"mailboxes\": {\"100\": \"P14D\"},\n  \"extensions_count\": 12,\n  \"is_blocked\": true,\n  \"early_retention_alert\": false,\n  \"updated_at\": \"2026-10-29T08:12:45.000000Z\"\n}\n```\n\n## Limits and billing\n\n| `code` | Call logs | SMS history | Call recording | Fax data | Voicemail |\n| --- | --- | --- | --- | --- | --- |\n| `none` | `P1Y` | `P1Y` | `P6M` | `P6M` | `P1M` |\n| `3y` | `P3Y` | `P3Y` | `P3Y` | `P3Y` | `P1M` |\n| `7y` | `P7Y` | `P7Y` | `P7Y` | `P7Y` | `P1M` |\n| `10y` | `P10Y` | `P10Y` | `P10Y` | `P10Y` | `P1M` |\n\nAn interval may be anything up to the limit; the voicemail limit is the same with every add-on. A value above the limit answers `422` with `Restricted values above the limit`, a string that is not a duration with `\u2026 is not an interval`, and a mailbox value above the account-wide one with `Voicemail retention for mailbox can not be more than Account Voicemail setting`.\n\nAdd-ons are priced per extension per month, which is why the settings carry `extensions_count`. Moving to a dearer add-on refunds the unused part of the month for the old one and charges the new one pro rata for the rest of the month (the full month when you switch on the 1st) plus the next month. Moving to a cheaper one gives no refund and charges from the next month. `none` cancels the current add-on and charges nothing.\n\n## Pending changes\n\nA pending value is recorded but not in force: the current one keeps applying, `is_blocked` is `true` and `updated_at` says when the change was made. The pending values become current 7 days later, at the next daily run (06:10 Irish time), or at once when you call activate-now; cancel drops them. The API stores the policy; a separate retention process applies it to the stored data and deletes, per type, what is older than the current interval. The API itself deletes nothing and reports no progress.\n\n## How a retention change takes effect\n\n```mermaid\nstateDiagram-v2\n    [*] --> Current: POST /v2/data-retention/settings, value >= today's (in force at once)\n    [*] --> Pending: POST /v2/data-retention/settings, value shorter (is_blocked: true)\n    Pending --> Current: daily run at 06:10 Irish time, 7 days later\n    Pending --> Current: PATCH /v2/data-retention/settings/activate-now (skips the wait)\n    Pending --> Current: PATCH /v2/data-retention/settings/cancel (pending dropped, current unchanged)\n```\n\n## Roles and access\n\n- Every endpoint in this group is for **account admins**: any other user gets `403` with the body `\"Forbidden\"`, a missing or invalid token `401` `\"Unauthorized\"`. Every call is written to the account's change log.\n- `updated_at` is an ISO 8601 UTC timestamp (`2026-10-29T08:12:45.000000Z`). On an account without the ISO dates option it is the current time instead of `null` when nothing is pending.\n\n## Pitfalls\n\n> [!WARNING]\n> Send all five intervals on every save. A type you leave out loses its value once the change applies \u2014 at once for an increase, after the grace period for a reduction \u2014 and its `current` reads `null`.\n\n- `204` does not say whether the change applied or is pending: read the settings back and look at `is_blocked` and `pending`.\n- Any shorter value makes every account-wide value in that request pending, the ones you raised included.\n- The API does not refuse a second change while one is pending; the portal does (it blocks the form while `is_blocked` is `true`). Cancel or activate the pending change first, or the settings answer becomes ambiguous.\n- Call activate-now only while `is_blocked` is `true`: without a pending change it archives the current values, and every `current` reads `null` until you save again.\n- Durations are compared with a 30-day month and a 360-day year: `P12M` equals `P1Y`, `P365D` exceeds it, and the voicemail limit `P1M` admits `P30D` but not `P31D`.\n- A mailbox value is checked against the account-wide voicemail interval already saved, not the one in the same request. Raise the account-wide value in one request and the mailbox values in the next.\n- Sending the `code` of the add-on already active is not a no-op: it cancels and re-activates the add-on, with a new pro-rata charge for the rest of the month.\n- Saving settings or activating now forgets the add-on that cancel could restore; a later cancel only drops pending values.\n- A reduction emails the account's primary contact; an increase, activate-now and cancel send nothing."
        },
        {
            "name": "I18n"
        },
        {
            "name": "Client Operations",
            "description": "Client operations are the account's data-subject tools: for one phone number, export the data NUACOM holds that involves it, or schedule its deletion or anonymisation \u2014 what a GDPR access or erasure request calls for. The group holds the export, the scheduling of a delete or anonymise operation, the list of scheduled and finished operations and the delete of a scheduled one. The data they act on is the call history of [Call Logs](/v2/docs/groups/call-logs), the phonebook contacts, the SMS messages and the voicemail messages that involve the number.\n\n## Workflow (what the portal does)\n\n1. **Export**: [`POST /v2/client-operations/export/{phone}`](/v2/ref#/operations/clientOperations.export) with `payload`, the list of sections to include: `call_logs`, `phonebook`, `sms`, `voicemail`. It answers `204` at once; the export is built in the background and emailed to the user your API key acts as, with one CSV per section attached, named after your company, the section, the number and a timestamp. The number is matched in its local, international and E.164 forms; a number without `+` is read in the account's country. The columns:\n   - `call_logs`: Date, From, To, Direction, Duration, Disposition \u2014 the calls since 1 January 2021 in which the number is the caller or the called party;\n   - `phonebook`: First Name, Last Name, Mobile, Landline, Email, Address \u2014 the phonebook contacts that hold the number;\n   - `sms`: Status, Scheduled Send Time, Message, Number \u2014 the messages addressed to the number, drafts excluded;\n   - `voicemail`: Date, Caller, Duration \u2014 the voicemail messages left from the number.\n2. **Schedule a delete or anonymise**: [`POST /v2/client-operations/process/{phone}`](/v2/ref#/operations/clientOperations.process) with `process` (`delete` or `anonymize`) and `payload`, a non-empty list of sections with the names above. It answers `204`: the operation is stored as scheduled and an email confirming the request goes to the account's primary contact. When a scheduled operation of the same kind already exists for the number, its `payload` is replaced rather than a second one created. The processing itself runs later, in the background: the operation moves to processing and then to done. There is no endpoint to run it on demand and the API reports no details of what was changed.\n3. **List**: [`GET /v2/client-operations`](/v2/ref#/operations/clientOperations.index) answers at most 20 operations as a plain array, scheduled ones first, then processing, then done. Each row is `id`, `account_id`, `phone`, `process`, `payload`, `status` (`0` scheduled, `1` processing, `2` done), `status_label` (`Scheduled`, `Processing` or `Done`), `has_scheduled` (`true` while the row can still be deleted), `created_at` and `updated_at`. Exports are not listed: nothing is stored for them.\n4. **Delete a scheduled operation**: [`DELETE /v2/client-operations/{id}`](/v2/ref#/operations/clientOperations.delete) answers `204`. Once processing has started it answers `422` with `{\"error\": \"Only scheduled processes can be deleted\"}`; an id that is not one of your account's operations answers `404`.\n\n```bash\ncurl -X POST 'https://api.api-nuacom.com/v2/client-operations/process/+353861234567' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"process\": \"anonymize\", \"payload\": [\"call_logs\", \"sms\", \"voicemail\"]}'\n```\n\nThe list then shows:\n\n```json\n[\n  {\n    \"id\": 42,\n    \"account_id\": \"IE-00123\",\n    \"phone\": \"+353861234567\",\n    \"status\": 0,\n    \"process\": \"anonymize\",\n    \"payload\": [\"call_logs\", \"sms\", \"voicemail\"],\n    \"created_at\": \"2026-10-29 09:15:00\",\n    \"updated_at\": \"2026-10-29 09:15:00\",\n    \"status_label\": \"Scheduled\",\n    \"has_scheduled\": true\n  }\n]\n```\n\n## Roles and access\n\n- All four endpoints are for **account admins**: any other user gets `403` with the body `\"Forbidden\"`, a missing or invalid token `401` `\"Unauthorized\"`.\n- With the account's ISO dates option, `created_at` and `updated_at` are ISO 8601 in the `X-Timezone` you send, UTC by default (`2026-10-29T09:15:00+00:00`); without it they are `Y-m-d H:i:s` in Irish time. See [Dates and timezones](/v2/docs/dates-and-timezones).\n\n## Pitfalls\n\n- Both `POST` endpoints are asynchronous and answer `204` with no job id: the export arrives by email, and a scheduled operation is only visible in the list. Nothing tells you when the export has been sent.\n- `phone` is not validated when scheduling: the number is stored exactly as you send it. Use the international format (`+353861234567`).\n- The section names in `payload` are not validated when scheduling; an unknown name is stored as sent. For the export an unknown name is ignored, and an empty or missing `payload` still sends the email, with no attachments.\n- Scheduling the same `process` for the same number again replaces the earlier `payload`; it does not add to it.\n- The list is capped at 20 rows and has no paging; when the account has more, finished operations are the ones left out.\n- A `delete` operation cannot be undone, and the scheduled row can only be removed while it is still scheduled."
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "paths": {
        "/v2/auth/login": {
            "post": {
                "operationId": "auth.loginV1",
                "summary": "Login",
                "tags": [
                    "Auth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AuthRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "401": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "code": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "string"
                                        },
                                        "requirements": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "code",
                                        "error",
                                        "requirements"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "session_token": {
                                                    "type": "string"
                                                },
                                                "expire_in": {
                                                    "type": "integer",
                                                    "enum": [
                                                        7776000,
                                                        2592000
                                                    ]
                                                },
                                                "user_id": {
                                                    "type": "string"
                                                },
                                                "user_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "account_id": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "session_token",
                                                "expire_in",
                                                "user_id",
                                                "user_name",
                                                "account_id"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "integer",
                                                    "const": 200
                                                },
                                                "two_fa_enabled": {
                                                    "type": "boolean"
                                                },
                                                "form_data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "user_id": {
                                                            "type": "integer"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "$ref": "#/components/schemas/Stringable"
                                                        },
                                                        "remember": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "user_id",
                                                        "email",
                                                        "name",
                                                        "remember"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "code",
                                                "two_fa_enabled",
                                                "form_data"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/v2/auth/update-password": {
            "post": {
                "operationId": "auth.update-password",
                "summary": "Update an expired user password and invalidate all existing sessions",
                "tags": [
                    "Auth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdatePasswordRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "two_fa_code": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "two_fa_code"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "An error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Invalid credentials"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/v2/logout": {
            "post": {
                "operationId": "auth.logout",
                "summary": "Expire the current security session",
                "tags": [
                    "Auth"
                ],
                "responses": {
                    "401": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "code": {
                                            "type": "integer",
                                            "const": 401
                                        },
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "code",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "updated": {
                                            "type": "integer",
                                            "enum": [
                                                1,
                                                0
                                            ]
                                        }
                                    },
                                    "required": [
                                        "updated"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/account_info": {
            "get": {
                "operationId": "account.view",
                "summary": "Show account info",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "account_id": {
                                            "type": "string"
                                        },
                                        "company_name": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "company_email": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "billing_email": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "address": {
                                            "type": "object",
                                            "properties": {
                                                "address_1": {
                                                    "type": "string"
                                                },
                                                "address_2": {
                                                    "type": "string"
                                                },
                                                "city": {
                                                    "type": "string"
                                                },
                                                "county": {
                                                    "type": "string"
                                                },
                                                "country_iso_code": {
                                                    "type": "string"
                                                },
                                                "post_code": {
                                                    "type": "string"
                                                },
                                                "coordinates": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "address_1",
                                                "address_2",
                                                "city",
                                                "county",
                                                "country_iso_code",
                                                "post_code",
                                                "coordinates"
                                            ]
                                        },
                                        "account_holder": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "user_id": {
                                                    "type": "integer"
                                                },
                                                "user_email": {
                                                    "type": "string"
                                                },
                                                "user_name": {
                                                    "type": "string"
                                                },
                                                "last_login": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "examples": [
                                                        "2024-08-28T09:15:00+01:00"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "user_id",
                                                "user_email",
                                                "user_name",
                                                "last_login"
                                            ]
                                        },
                                        "account_country_code": {
                                            "type": "string"
                                        },
                                        "created_at": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "examples": [
                                                "2024-08-28T09:15:00+01:00"
                                            ]
                                        },
                                        "time_zone": {
                                            "type": "string"
                                        },
                                        "billing": {
                                            "type": "object",
                                            "properties": {
                                                "billing_currency": {
                                                    "type": "string"
                                                },
                                                "billing_type": {
                                                    "type": "string"
                                                },
                                                "sms_billing_type": {
                                                    "type": "string"
                                                },
                                                "account_balance": {
                                                    "type": "number"
                                                },
                                                "sms_balance": {
                                                    "type": "number"
                                                }
                                            },
                                            "required": [
                                                "billing_currency",
                                                "billing_type",
                                                "sms_billing_type",
                                                "account_balance",
                                                "sms_balance"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "account_id",
                                        "company_name",
                                        "company_email",
                                        "billing_email",
                                        "address",
                                        "account_holder",
                                        "account_country_code",
                                        "created_at",
                                        "time_zone",
                                        "billing"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/account-password-requirements": {
            "get": {
                "operationId": "v2.getPasswordRequirements",
                "summary": "Get account password requirements",
                "tags": [
                    "Account / Settings"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PasswordRequirementsResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/account-security-settings": {
            "get": {
                "operationId": "account-security-settings.index",
                "summary": "Show account security settings",
                "tags": [
                    "Account / Settings"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AccountSecuritySettingsResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/account-language-config": {
            "get": {
                "operationId": "account-language-config.index",
                "summary": "Get the account's AI language defaults and per-number/per-voicemail-box overrides",
                "tags": [
                    "Account / Language Config"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AccountLanguageConfigResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "account-language-config.store",
                "summary": "Replace the account's AI language defaults and per-number/per-voicemail-box overrides",
                "tags": [
                    "Account / Language Config"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreAccountLanguageConfigRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AccountLanguageConfigResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/language-options": {
            "get": {
                "operationId": "v2.languageOptions",
                "summary": "List the languages supported for AI call/voicemail transcription and analysis",
                "tags": [
                    "Account / Language Config"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/LanguageOptionResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/account-ai-config": {
            "get": {
                "operationId": "account-ai-config.index",
                "summary": "Get account AI config",
                "tags": [
                    "Account / AI Config"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AccountAiConfigResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "account-ai-config.store",
                "summary": "Create or update account AI config",
                "tags": [
                    "Account / AI Config"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreAccountAiConfigRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AccountAiConfigResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/account/billing-info": {
            "get": {
                "operationId": "account.accountGetBillingInfo",
                "summary": "The account's billing details: company, contacts, billing email, address and currency",
                "tags": [
                    "Account / Billing Info"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AccountBillingInfoData"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "account.accountUpdateBillingInfo",
                "description": "An address change is kept as a new address the account points at; the billing currency cannot be changed.",
                "summary": "Update the account's billing address; the company and contact details are read only",
                "tags": [
                    "Account / Billing Info"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateAccountBillingInfoData"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AccountBillingInfoData"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/users_list": {
            "get": {
                "operationId": "account.users",
                "description": "One unpaginated array in the shape V1 returned, including memberships awaiting\nactivation. GET /v3/users is the paginated list and carries each user's departments.",
                "summary": "List users (flat array, V1-compatible)",
                "tags": [
                    "Users"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/UsersListItemResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/user_info": {
            "get": {
                "operationId": "user.view",
                "description": "The account behind the token, the caller's permissions, enabled features, recording\naccess and outbound CLI. GET /v3/users/me returns the user's own profile record instead.",
                "summary": "Show the current session's context",
                "tags": [
                    "Users"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UserInfoResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/users/me": {
            "get": {
                "operationId": "v3.users.me",
                "description": "The caller's own user record and the portal pages they may open. GET /v2/user_info\nreturns the session's account context and permissions instead.",
                "summary": "Show my user profile",
                "tags": [
                    "Users"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebUserDetailedResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/users": {
            "get": {
                "operationId": "v3.users.users.index",
                "description": "GET /v2/users_list returns the same members as one flat, unpaginated array in the shape\nV1 used, and includes memberships awaiting activation.",
                "summary": "List users (paginated, with departments)",
                "tags": [
                    "Users"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Items per page",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 25
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WebUserResource"
                                            }
                                        },
                                        "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": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/users/{user}": {
            "get": {
                "operationId": "v3.users.users.show",
                "description": "Returns user details",
                "summary": "User details",
                "tags": [
                    "Users"
                ],
                "parameters": [
                    {
                        "name": "user",
                        "in": "path",
                        "required": true,
                        "description": "User Id",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "user": {
                                            "$ref": "#/components/schemas/WebUserDetailedResource"
                                        }
                                    },
                                    "required": [
                                        "user"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "v3.users.users.update",
                "summary": "Update User details",
                "tags": [
                    "Users"
                ],
                "parameters": [
                    {
                        "name": "user",
                        "in": "path",
                        "required": true,
                        "description": "User Id",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebUserRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "success"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/extension-activity": {
            "get": {
                "operationId": "extensionActivity.index",
                "summary": "List extension activity",
                "tags": [
                    "Extensions"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "extension": {
                                                        "type": "string"
                                                    },
                                                    "extName": {
                                                        "anyOf": [
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "string",
                                                                "enum": [
                                                                    ""
                                                                ]
                                                            }
                                                        ]
                                                    },
                                                    "online": {
                                                        "type": "array",
                                                        "items": {}
                                                    }
                                                },
                                                "required": [
                                                    "extension",
                                                    "extName",
                                                    "online"
                                                ]
                                            }
                                        },
                                        "filters": {
                                            "type": "object",
                                            "properties": {
                                                "accountId": {
                                                    "type": "string"
                                                },
                                                "date": {},
                                                "interval": {
                                                    "type": "object",
                                                    "properties": {
                                                        "start": {
                                                            "type": "string"
                                                        },
                                                        "stop": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "start",
                                                        "stop"
                                                    ]
                                                },
                                                "departmentId": {
                                                    "type": "integer"
                                                },
                                                "extensions": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "timezone": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "accountId",
                                                "date",
                                                "interval",
                                                "departmentId",
                                                "extensions",
                                                "timezone"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "filters"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/extensions/set-dynamic-agent-queue-status": {
            "post": {
                "operationId": "extensions.updateDynamicAgentQueueStatus",
                "summary": "Set dynamic agent queue status",
                "tags": [
                    "Extensions"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SetAgentQueueStatusRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string",
                                            "const": "Agent was not changed"
                                        },
                                        "description": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error",
                                        "message",
                                        "description"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/extensions": {
            "get": {
                "operationId": "extensions.index",
                "summary": "List extensions",
                "tags": [
                    "Extensions"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ExtensionsListResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "extensions.deleteExtensions",
                "summary": "Delete extensions",
                "tags": [
                    "Extensions"
                ],
                "parameters": [
                    {
                        "name": "extensions[]",
                        "in": "query",
                        "required": true,
                        "description": "Extension numbers to delete",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/extensions/available-cli": {
            "get": {
                "operationId": "v2.extensionsAvailableCli",
                "summary": "List available CLI extensions",
                "tags": [
                    "Extensions"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ExtensionsAvailableCliResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/extensions/store": {
            "post": {
                "operationId": "extensions.store",
                "summary": "Create extensions",
                "tags": [
                    "Extensions"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreExtensionsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/extensions/{extNumber}/set-name": {
            "put": {
                "operationId": "extensions.updateExtensionName",
                "summary": "Update extension name",
                "tags": [
                    "Extensions"
                ],
                "parameters": [
                    {
                        "name": "extNumber",
                        "in": "path",
                        "required": true,
                        "description": "Extension number",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SetExtensionNameRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/extensions/change-subscription": {
            "post": {
                "operationId": "extensions.changeSubscription",
                "summary": "Change extension subscription",
                "tags": [
                    "Extensions / Subscriptions"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ChangeExtSubscriptionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/extensions/add-subscription": {
            "post": {
                "operationId": "extensions.addSubscription",
                "summary": "Add subscription to extension",
                "tags": [
                    "Extensions / Subscriptions"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AddExtSubscriptionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/extensions/{extNumber}/subscription": {
            "delete": {
                "operationId": "extensions.cancelSubscription",
                "summary": "Cancel extension subscription",
                "tags": [
                    "Extensions / Subscriptions"
                ],
                "parameters": [
                    {
                        "name": "extNumber",
                        "in": "path",
                        "required": true,
                        "description": "Extension number",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/departments": {
            "get": {
                "operationId": "departments.index",
                "summary": "List departments",
                "tags": [
                    "Departments"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/DepartmentResource"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/departments/store": {
            "post": {
                "operationId": "departments.store",
                "summary": "Create department",
                "tags": [
                    "Departments"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/DepartmentStoreRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DepartmentResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/departments/{department}/update": {
            "put": {
                "operationId": "departments.update",
                "summary": "Update department",
                "tags": [
                    "Departments"
                ],
                "parameters": [
                    {
                        "name": "department",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/DepartmentStoreRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "boolean"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "description": "No department with that id on this account",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/departments/{department}/delete": {
            "delete": {
                "operationId": "departments.destroy",
                "summary": "Delete department",
                "tags": [
                    "Departments"
                ],
                "parameters": [
                    {
                        "name": "department",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "boolean"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "description": "No department with that id on this account",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/teams": {
            "get": {
                "operationId": "v3.teams.teams.index",
                "summary": "Get Teams List",
                "tags": [
                    "Teams"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number (15 rows per page)",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sort field. Allowed: id. Prefix with - for descending. Default: id",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-id"
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "description": "Include relations. Allowed: team, users, usersCount",
                        "schema": {
                            "type": "string"
                        },
                        "example": "users"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/TeamResource"
                                            }
                                        },
                                        "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": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v3.teams.teams.store",
                "summary": "Create Team",
                "tags": [
                    "Teams"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TeamRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TeamResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/teams/{teamId}": {
            "get": {
                "operationId": "v3.teams.teams.show",
                "summary": "Show Team Info",
                "tags": [
                    "Teams"
                ],
                "parameters": [
                    {
                        "name": "teamId",
                        "in": "path",
                        "required": true,
                        "description": "Team ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TeamResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "v3.teams.teams.update",
                "summary": "Update Team",
                "tags": [
                    "Teams"
                ],
                "parameters": [
                    {
                        "name": "teamId",
                        "in": "path",
                        "required": true,
                        "description": "Team ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TeamRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TeamResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v3.teams.teams.destroy",
                "summary": "Delete Team",
                "tags": [
                    "Teams"
                ],
                "parameters": [
                    {
                        "name": "teamId",
                        "in": "path",
                        "required": true,
                        "description": "Team ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/teams/{teamId}/users": {
            "get": {
                "operationId": "v3.teams.users.index",
                "summary": "Get Team Users List",
                "tags": [
                    "Teams / Users"
                ],
                "parameters": [
                    {
                        "name": "teamId",
                        "in": "path",
                        "required": true,
                        "description": "Team ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WebUserResource"
                                            }
                                        },
                                        "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": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/teams/{teamId}/users/{user}": {
            "put": {
                "operationId": "v3.teams.users.update",
                "summary": "Add user to Team",
                "tags": [
                    "Teams / Users"
                ],
                "parameters": [
                    {
                        "name": "teamId",
                        "in": "path",
                        "required": true,
                        "description": "Team ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    },
                    {
                        "name": "user",
                        "in": "path",
                        "required": true,
                        "description": "User ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TeamResource"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v3.teams.users.destroy",
                "summary": "Delete User From Team",
                "tags": [
                    "Teams / Users"
                ],
                "parameters": [
                    {
                        "name": "teamId",
                        "in": "path",
                        "required": true,
                        "description": "Team ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    },
                    {
                        "name": "user",
                        "in": "path",
                        "required": true,
                        "description": "User ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/my-numbers": {
            "get": {
                "operationId": "account.myNumbers",
                "summary": "List account numbers",
                "tags": [
                    "Numbers"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/numbers/search": {
            "get": {
                "operationId": "numbers.search",
                "summary": "Search available numbers",
                "tags": [
                    "Numbers"
                ],
                "parameters": [
                    {
                        "name": "category",
                        "in": "query",
                        "required": true,
                        "description": "Number category",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "free",
                                "paid_1",
                                "paid_2",
                                "paid_3"
                            ]
                        },
                        "example": "free"
                    },
                    {
                        "name": "iso",
                        "in": "query",
                        "description": "Country ISO code",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "example": "IE"
                    },
                    {
                        "name": "number_contains",
                        "in": "query",
                        "description": "Number substring filter",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "pattern": "^\\+?\\d{2,20}$",
                            "maxLength": 21
                        },
                        "example": "123"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/CallRoutingInbound"
                                                    }
                                                },
                                                "first_page_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "next_page_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "prev_page_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "data",
                                                "first_page_url",
                                                "from",
                                                "next_page_url",
                                                "path",
                                                "per_page",
                                                "prev_page_url",
                                                "to"
                                            ]
                                        },
                                        {
                                            "type": "array",
                                            "items": {}
                                        },
                                        {
                                            "type": "object",
                                            "additionalProperties": {}
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/numbers/order/countries-info": {
            "get": {
                "operationId": "orderPhoneNumber.infoByCountries",
                "summary": "Get number pricing info by country",
                "tags": [
                    "Numbers"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "anyOf": [
                                            {
                                                "type": "object",
                                                "properties": {
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "iso": {
                                                        "type": "string"
                                                    },
                                                    "price": {
                                                        "type": "string"
                                                    },
                                                    "priceMonthly": {
                                                        "type": "string"
                                                    },
                                                    "currency": {
                                                        "type": "string",
                                                        "const": "\u20ac"
                                                    }
                                                },
                                                "required": [
                                                    "name",
                                                    "iso",
                                                    "price",
                                                    "priceMonthly",
                                                    "currency"
                                                ]
                                            },
                                            {
                                                "type": "object",
                                                "properties": {
                                                    "name": {
                                                        "type": "string",
                                                        "const": "Others Regions"
                                                    },
                                                    "iso": {
                                                        "type": "string",
                                                        "const": "xx"
                                                    },
                                                    "price": {
                                                        "type": "string",
                                                        "const": "Custom Price"
                                                    },
                                                    "priceMonthly": {
                                                        "type": "null"
                                                    },
                                                    "currency": {
                                                        "type": "string",
                                                        "const": "\u20ac"
                                                    }
                                                },
                                                "required": [
                                                    "name",
                                                    "iso",
                                                    "price",
                                                    "priceMonthly",
                                                    "currency"
                                                ]
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/numbers/order/search-available-numbers": {
            "get": {
                "operationId": "orderPhoneNumber.searchAvailableNumbers",
                "summary": "Search available phone numbers",
                "tags": [
                    "Numbers"
                ],
                "parameters": [
                    {
                        "name": "category",
                        "in": "query",
                        "required": true,
                        "description": "Number category",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "paid_1"
                            ]
                        },
                        "example": "paid_1"
                    },
                    {
                        "name": "iso",
                        "in": "query",
                        "required": true,
                        "description": "Country ISO code",
                        "schema": {
                            "type": "string"
                        },
                        "example": "IE"
                    },
                    {
                        "name": "areaCode",
                        "in": "query",
                        "description": "Area code filter",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "example": "01"
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Number type filter",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "example": "geographic"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {}
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/numbers/order/phone-number-request": {
            "post": {
                "operationId": "orderPhoneNumber.orderPhoneNumberRequest",
                "summary": "Request phone number purchase",
                "tags": [
                    "Numbers"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RequestPurchaseNumbersRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "const": "success"
                                        },
                                        "numbers": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "status",
                                        "numbers"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "const": "error"
                                        }
                                    },
                                    "required": [
                                        "status"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/numbers/get-requirements": {
            "get": {
                "operationId": "numbers.getRequirements",
                "summary": "Get requirements for a number category",
                "tags": [
                    "Numbers"
                ],
                "parameters": [
                    {
                        "name": "category",
                        "in": "query",
                        "required": true,
                        "description": "Number provider category",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "paid_1",
                                "paid_2"
                            ]
                        },
                        "example": "paid_1"
                    },
                    {
                        "name": "country_iso",
                        "in": "query",
                        "required": true,
                        "description": "Country ISO code",
                        "schema": {
                            "type": "string"
                        },
                        "example": "IE"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/numbers/supporting-document-types": {
            "get": {
                "operationId": "numbers.getSupportingDocuments",
                "summary": "List supporting document types",
                "tags": [
                    "Numbers"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/numbers/proof-types": {
            "get": {
                "operationId": "numbers.getProofTypes",
                "summary": "List proof types",
                "tags": [
                    "Numbers"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/calls-block-unblock": {
            "get": {
                "operationId": "calls-block-unblock.index",
                "description": "Rules per call destination (a country or prefix mask), resolved per extension. A different\nresource from GET /v3/number-blocking, which lists individually blocked phone numbers.",
                "summary": "List destination blocking rules",
                "tags": [
                    "Number Blocking"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": true,
                        "description": "Current page number",
                        "schema": {
                            "type": "string",
                            "minLength": 1
                        },
                        "example": 1
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "required": true,
                        "description": "Rows per page",
                        "schema": {
                            "type": "number",
                            "enum": [
                                "15",
                                "25",
                                "50",
                                "100",
                                "-1"
                            ]
                        },
                        "example": 15
                    },
                    {
                        "name": "filter[]",
                        "in": "query",
                        "description": "Filters to apply",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sorting fields, comma separated. Prefix with '-' for descending",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-id"
                    },
                    {
                        "name": "filter[sSearch]",
                        "in": "query",
                        "description": "Partial match by destination name or prefix mask",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Ireland"
                    },
                    {
                        "name": "extension",
                        "in": "query",
                        "description": "Comma-separated extension numbers; blocking status is calculated for these extensions only",
                        "schema": {
                            "type": "string"
                        },
                        "example": "101,102"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/CallBlockingCollectionResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "calls-block-unblock.store",
                "description": "Blocks a whole destination for the given extensions. To block one phone number instead,\nuse POST /v3/number-blocking.",
                "summary": "Block or unblock a call destination",
                "tags": [
                    "Number Blocking"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BlockUnblockCallRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/number-blocking": {
            "get": {
                "operationId": "v3.number-blocking.index",
                "description": "Individual phone numbers blocked for the account, inbound and/or outbound. A different\nresource from GET /v2/calls-block-unblock, which lists per-destination rules.",
                "summary": "Get Blocked Numbers List",
                "tags": [
                    "Number Blocking"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": true,
                        "description": "Current Page",
                        "schema": {
                            "type": "string",
                            "minLength": 1
                        },
                        "example": 1
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "required": true,
                        "description": "Rows per Page",
                        "schema": {
                            "type": "number",
                            "enum": [
                                "15",
                                "25",
                                "50",
                                "100"
                            ]
                        },
                        "example": 15
                    },
                    {
                        "name": "filter[]",
                        "in": "query",
                        "description": "Filters",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sorting fields. Add '-' before field to sort descending",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-id"
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Search by phone number or notes",
                        "schema": {
                            "type": "string"
                        },
                        "example": "353"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/NumberBlockingResource"
                                            }
                                        },
                                        "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"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v3.number-blocking.store",
                "summary": "Create Blocked Number",
                "tags": [
                    "Number Blocking"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/NumberBlockingStoreRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/number-blocking/{entryId}": {
            "put": {
                "operationId": "v3.number-blocking.update",
                "summary": "Update Blocked Number",
                "tags": [
                    "Number Blocking"
                ],
                "parameters": [
                    {
                        "name": "entryId",
                        "in": "path",
                        "required": true,
                        "description": "Blocked number entry ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 123
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/NumberBlockingUpdateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v3.number-blocking.destroy",
                "summary": "Delete Blocked Number",
                "tags": [
                    "Number Blocking"
                ],
                "parameters": [
                    {
                        "name": "entryId",
                        "in": "path",
                        "required": true,
                        "description": "Blocked number entry ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 123
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/blacklist-numbers": {
            "get": {
                "operationId": "v3.blacklist-numbers.index",
                "summary": "Get all blacklisted mobile numbers",
                "tags": [
                    "Blacklist Numbers"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/BlackListNumbersResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v3.blacklist-numbers.store",
                "summary": "Block a mobile number",
                "tags": [
                    "Blacklist Numbers"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BlackListNumbersRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BlackListNumbersResource"
                                }
                            }
                        }
                    },
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/blacklist-numbers/{mobileNumber}": {
            "get": {
                "operationId": "v3.blacklist-numbers.show",
                "summary": "Check if a mobile number is blacklisted",
                "tags": [
                    "Blacklist Numbers"
                ],
                "parameters": [
                    {
                        "name": "mobileNumber",
                        "in": "path",
                        "required": true,
                        "description": "Mobile number",
                        "schema": {
                            "type": "string"
                        },
                        "example": "0037379123456"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BlackListNumbersResource"
                                }
                            }
                        }
                    },
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v3.blacklist-numbers.destroy",
                "summary": "Unblock a blacklisted mobile number",
                "tags": [
                    "Blacklist Numbers"
                ],
                "parameters": [
                    {
                        "name": "mobileNumber",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "0037379123456"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/marked-mobile-numbers/summary": {
            "get": {
                "operationId": "v2.markedMobileNumberSummary",
                "summary": "Get marked mobile number summary",
                "tags": [
                    "Marked Mobile Numbers"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "status_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "status_value": {
                                                        "type": "string"
                                                    },
                                                    "count": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "status_id",
                                                    "status_value",
                                                    "count"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/marked-mobile-numbers": {
            "get": {
                "operationId": "marked-mobile-numbers.index",
                "summary": "List marked mobile numbers",
                "tags": [
                    "Marked Mobile Numbers"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Rows per page. Default: 10",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 10
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sort field. Allowed: mobile_number, entrydate, status. Prefix with - for descending. Default: -entrydate",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-entrydate"
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Partial match by mobile number",
                        "schema": {
                            "type": "string"
                        },
                        "example": "35386"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/MarkedMobileNumberResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "marked-mobile-numbers.store",
                "summary": "Create a marked mobile number",
                "tags": [
                    "Marked Mobile Numbers"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/MarkedMobileNumberRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/marked-mobile-numbers/{mobileNumber}": {
            "delete": {
                "operationId": "marked-mobile-numbers.destroy",
                "summary": "Delete a marked mobile number",
                "tags": [
                    "Marked Mobile Numbers"
                ],
                "parameters": [
                    {
                        "name": "mobileNumber",
                        "in": "path",
                        "required": true,
                        "description": "Mobile number",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/ivr/{id}/menu": {
            "put": {
                "operationId": "v2.ivrMenu",
                "summary": "Replaces menu config and, if the options prompt is on, digit routing",
                "tags": [
                    "IVR"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Menu id to update",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IvrMenuUpdateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/public_holidays/{countryCode}": {
            "get": {
                "operationId": "publicHolidays.index",
                "summary": "List public holidays by country code",
                "tags": [
                    "Holiday Settings"
                ],
                "parameters": [
                    {
                        "name": "countryCode",
                        "in": "path",
                        "required": true,
                        "description": "Country ISO code",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/PublicHoliday"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/public_holidays_by_ivr": {
            "get": {
                "operationId": "publicHolidays.byIvr",
                "summary": "List public holidays grouped by IVR",
                "tags": [
                    "Holiday Settings"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/ivr/custom_holiday_settings": {
            "get": {
                "operationId": "customHolidaySettings.index",
                "summary": "List custom holiday settings",
                "tags": [
                    "Holiday Settings"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomHolidaySettingsCollection"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "customHolidaySettings.update",
                "summary": "Update custom holiday settings",
                "tags": [
                    "Holiday Settings"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CustomHolidaySettingsUpdateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/ivr/{ivrId}/custom_holiday_settings": {
            "delete": {
                "operationId": "customHolidaySettings.clearByIvr",
                "summary": "Clear all custom holiday settings for an IVR",
                "tags": [
                    "Holiday Settings"
                ],
                "parameters": [
                    {
                        "name": "ivrId",
                        "in": "path",
                        "required": true,
                        "description": "IVR ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/ivr/custom_holiday_settings/{id}": {
            "delete": {
                "operationId": "customHolidaySettings.remove",
                "summary": "Delete a custom holiday settings rule",
                "tags": [
                    "Holiday Settings"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Rule ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/ivr/public_holiday_settings": {
            "get": {
                "operationId": "publicHolidaySettings.index",
                "summary": "List public holiday settings",
                "tags": [
                    "Holiday Settings"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PublicHolidaySettingsCollection"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "publicHolidaySettings.update",
                "summary": "Update public holiday settings",
                "tags": [
                    "Holiday Settings"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PublicHolidaySettingsUpdateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/ivr/{ivrId}/public_holiday_settings": {
            "delete": {
                "operationId": "publicHolidaySettings.clearByIvr",
                "summary": "Clear all public holiday settings for an IVR",
                "tags": [
                    "Holiday Settings"
                ],
                "parameters": [
                    {
                        "name": "ivrId",
                        "in": "path",
                        "required": true,
                        "description": "IVR ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/announcements/upload-audio": {
            "post": {
                "operationId": "announcements.uploadAudio",
                "summary": "Upload announcement audio",
                "tags": [
                    "Announcements"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UploadAudioRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/softphone-announcements/{id}": {
            "post": {
                "operationId": "softphone-announcements.updateWithAudio",
                "description": "Served on PUT and, for a multipart body carrying a new audio file, on POST to the same\npath; the two are the same operation.",
                "summary": "Update a softphone announcement",
                "tags": [
                    "Softphone Announcements"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Softphone announcement ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/SoftphoneAnnouncementUpdateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "softphone-announcements.show",
                "summary": "Show a softphone announcement",
                "tags": [
                    "Softphone Announcements"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Softphone announcement ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "softphone-announcements.update",
                "description": "Served on PUT and, for a multipart body carrying a new audio file, on POST to the same\npath; the two are the same operation.",
                "summary": "Update a softphone announcement",
                "tags": [
                    "Softphone Announcements"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Softphone announcement ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/SoftphoneAnnouncementUpdateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "softphone-announcements.destroy",
                "summary": "Delete a softphone announcement",
                "tags": [
                    "Softphone Announcements"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Softphone announcement ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/softphone-announcements": {
            "get": {
                "operationId": "softphone-announcements.index",
                "summary": "List softphone announcements",
                "tags": [
                    "Softphone Announcements"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "softphone-announcements.store",
                "summary": "Create a softphone announcement",
                "tags": [
                    "Softphone Announcements"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/SoftphoneAnnouncementStoreRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SoftphoneAnnouncement"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/softphone-announcements/{id}/audio": {
            "get": {
                "operationId": "v2.softphoneAnnouncementAudio",
                "summary": "Download softphone announcement audio",
                "tags": [
                    "Softphone Announcements"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Softphone announcement ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/queues": {
            "get": {
                "operationId": "queues.index",
                "description": "Returns each queue with its headsets, configuration and usage, or with `basic=true` only\nid, number, name and description \u2014 which is what GET /v3/queues always returns.",
                "summary": "List account queues with their agents",
                "tags": [
                    "Queues"
                ],
                "parameters": [
                    {
                        "name": "basic",
                        "in": "query",
                        "description": "Return only id, number, name and description for each queue, without headset details",
                        "schema": {
                            "type": "boolean"
                        },
                        "example": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/AccountQueueWithHeadsetResource"
                                            }
                                        },
                                        {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/AccountQueueResource"
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/queue-dynamic-agents": {
            "get": {
                "operationId": "v2.getQueueDynamicAgents",
                "summary": "Get queue dynamic agents report",
                "tags": [
                    "Queues"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": true,
                        "description": "Current page number",
                        "schema": {
                            "type": "string",
                            "minLength": 1
                        },
                        "example": 1
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "required": true,
                        "description": "Rows per page",
                        "schema": {
                            "type": "number",
                            "enum": [
                                "15",
                                "25",
                                "50",
                                "100",
                                "-1"
                            ]
                        },
                        "example": 15
                    },
                    {
                        "name": "filter[]",
                        "in": "query",
                        "description": "Filters to apply",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sorting fields, comma separated. Prefix with '-' for descending",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-id"
                    },
                    {
                        "name": "filter[ext]",
                        "in": "query",
                        "description": "Exact match by extension number",
                        "schema": {
                            "type": "string"
                        },
                        "example": "101"
                    },
                    {
                        "name": "filter[queue]",
                        "in": "query",
                        "description": "Exact match by queue number",
                        "schema": {
                            "type": "string"
                        },
                        "example": "600"
                    },
                    {
                        "name": "filter[action]",
                        "in": "query",
                        "description": "Exact match by agent action (0 logout, 1 login)",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "filter[user_name]",
                        "in": "query",
                        "description": "Exact match by user name",
                        "schema": {
                            "type": "string"
                        },
                        "example": "john.doe"
                    },
                    {
                        "name": "filter[platform]",
                        "in": "query",
                        "description": "Exact match by platform",
                        "schema": {
                            "type": "string"
                        },
                        "example": "web"
                    },
                    {
                        "name": "filter[date]",
                        "in": "query",
                        "description": "Date range as two Unix timestamps separated by \"-\" (from-to)",
                        "schema": {
                            "type": "string"
                        },
                        "example": "1735689600-1738368000"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/QueueDynamicAgentResource"
                                            }
                                        },
                                        "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"
                                            ]
                                        },
                                        "agents": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "queues": {
                                            "type": "array",
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta",
                                        "agents",
                                        "queues"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/queue-dynamic-agents/status": {
            "get": {
                "operationId": "v2.getQueueStatus",
                "summary": "Get queue dynamic agent status report",
                "tags": [
                    "Queues"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/QueueDynamicAgentResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/account-queue-headset": {
            "get": {
                "operationId": "account-queue-headset.index",
                "summary": "List queue agents",
                "tags": [
                    "Queues"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/AccountQueueHeadsetResource"
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "An error\n\nAn error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "User doesnt have current active account."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "User doesnt have a extension on the current active account."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "account-queue-headset.store",
                "summary": "Add extension to queue",
                "tags": [
                    "Queues"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AgentQueueHeadsetRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/account-queue-headset/{account_queue_headset}": {
            "delete": {
                "operationId": "account-queue-headset.destroy",
                "summary": "Remove extension from queue",
                "tags": [
                    "Queues"
                ],
                "parameters": [
                    {
                        "name": "account_queue_headset",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "queue_number",
                        "in": "query",
                        "required": true,
                        "description": "Queue number",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 10
                    },
                    {
                        "name": "extension_number",
                        "in": "query",
                        "required": true,
                        "description": "Extension number",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 31
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/queues": {
            "get": {
                "operationId": "v3.queues.index",
                "description": "The queues the caller may see, as id, name, number and description. GET /v2/queues covers\nthe same queues and adds their headsets, configuration and usage.",
                "summary": "List account queues, id and name only",
                "tags": [
                    "Queues"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/App.Http.Resources.Api.V3.AccountQueueResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/speed-dial": {
            "get": {
                "operationId": "v3.speed-dial.index",
                "summary": "Get Speed Dial Codes",
                "tags": [
                    "Speed Dial"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v3.speed-dial.store",
                "summary": "Update Speed Dial Codes",
                "tags": [
                    "Speed Dial"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SpeedDialRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/call-logs/{callId}": {
            "get": {
                "operationId": "v2.getCallLogUnique",
                "summary": "Get call log by call ID",
                "tags": [
                    "Call Logs"
                ],
                "parameters": [
                    {
                        "name": "callId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "callId",
                        "in": "query",
                        "required": true,
                        "description": "Call Unique ID or CDR ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": 1234567890.123
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    },
                                    "minItems": 0,
                                    "maxItems": 0,
                                    "additionalItems": false
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/call-log": {
            "get": {
                "operationId": "callLog.callLog",
                "summary": "List call log entries with pagination",
                "tags": [
                    "Call Logs"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "_embedded": {
                                            "type": "string"
                                        },
                                        "_selectable": {
                                            "type": "string"
                                        },
                                        "_links": {
                                            "type": "string"
                                        },
                                        "page_count": {
                                            "type": "string"
                                        },
                                        "page_size": {
                                            "type": "string"
                                        },
                                        "total_items": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "_embedded",
                                        "_selectable",
                                        "_links",
                                        "page_count",
                                        "page_size",
                                        "total_items"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/call-log-export": {
            "get": {
                "operationId": "callLog.callLogExport",
                "summary": "Export call logs as CSV",
                "tags": [
                    "Call Logs"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/call-log-extensions": {
            "get": {
                "operationId": "callLog.callLogAllowedExtensions",
                "summary": "List allowed extensions for call log filtering",
                "tags": [
                    "Call Logs"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/call-log-queues": {
            "get": {
                "operationId": "callLog.callLogAllowedQueues",
                "summary": "List allowed queues for call log filtering",
                "tags": [
                    "Call Logs"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/call-log-json": {
            "get": {
                "operationId": "callLog.callLogInJsonFormat",
                "summary": "List call log entries in nested JSON format",
                "tags": [
                    "Call Logs"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "_embedded": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "minItems": 0,
                                            "maxItems": 0,
                                            "additionalItems": false
                                        },
                                        "_selectable": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "minItems": 0,
                                            "maxItems": 0,
                                            "additionalItems": false
                                        },
                                        "_links": {
                                            "type": "string"
                                        },
                                        "page_count": {
                                            "type": "string"
                                        },
                                        "page_size": {
                                            "type": "string"
                                        },
                                        "total_items": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "_embedded",
                                        "_selectable",
                                        "_links",
                                        "page_count",
                                        "page_size",
                                        "total_items"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/call-recording/statistics": {
            "get": {
                "operationId": "call_recording.statistics",
                "summary": "Get call recording statistics",
                "tags": [
                    "Call Recording"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "used": {
                                            "type": "object",
                                            "properties": {
                                                "value": {
                                                    "type": "integer"
                                                },
                                                "formatted": {
                                                    "type": "string"
                                                },
                                                "percentage": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "value",
                                                "formatted",
                                                "percentage"
                                            ]
                                        },
                                        "allowed": {
                                            "type": "object",
                                            "properties": {
                                                "value": {
                                                    "type": "integer"
                                                },
                                                "formatted": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "value",
                                                "formatted"
                                            ]
                                        },
                                        "oldest_file": {
                                            "type": "object",
                                            "properties": {
                                                "date": {
                                                    "type": "null"
                                                }
                                            },
                                            "required": [
                                                "date"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "used",
                                        "allowed",
                                        "oldest_file"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/call-recording/{callUniqueId}": {
            "delete": {
                "operationId": "call_recording.destroy",
                "summary": "Delete a call recording",
                "tags": [
                    "Call Recording"
                ],
                "parameters": [
                    {
                        "name": "callUniqueId",
                        "in": "path",
                        "required": true,
                        "description": "Call unique ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/call-recording/{callId}": {
            "get": {
                "operationId": "v3.callRecording",
                "description": "Fetches a call recording file for playback.",
                "summary": "Fetch call recording file by Call ID",
                "tags": [
                    "Call Recording"
                ],
                "parameters": [
                    {
                        "name": "format",
                        "in": "query",
                        "description": "Recording format: 0=MP3, 1=OGG, 2=WAV",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "enum": [
                                "0",
                                "1",
                                "2",
                                null
                            ]
                        },
                        "example": "0"
                    },
                    {
                        "name": "start",
                        "in": "query",
                        "description": "Start position in seconds",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "example": "0"
                    },
                    {
                        "name": "end",
                        "in": "query",
                        "description": "End position in seconds",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "example": "0"
                    },
                    {
                        "name": "callId",
                        "in": "path",
                        "required": true,
                        "description": "Unique identifier for the call",
                        "schema": {
                            "type": "string"
                        },
                        "example": "1234567890.123"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "text/html": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        },
                        "headers": {
                            "Transfer-Encoding": {
                                "required": true,
                                "schema": {
                                    "type": "string",
                                    "enum": [
                                        "chunked"
                                    ]
                                }
                            }
                        }
                    },
                    "206": {
                        "description": "",
                        "content": {
                            "text/html": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        },
                        "headers": {
                            "Transfer-Encoding": {
                                "required": true,
                                "schema": {
                                    "type": "string",
                                    "enum": [
                                        "chunked"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "description": "An error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Recording not found."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/call-notes": {
            "get": {
                "operationId": "callLog.callNotes",
                "summary": "Get call notes for specified call IDs",
                "tags": [
                    "Call Notes"
                ],
                "parameters": [
                    {
                        "name": "callIDs",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/CallNote"
                                    }
                                }
                            }
                        }
                    },
                    "406": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "boolean"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v2.addCallNote",
                "description": "Does exactly what POST /v3/call-notes does: same `callId` and `note` body, same `204`,\nsame CRM update and `note_added` webhook. Either path works; neither is preferred.",
                "summary": "Add a note to a call (duplicate of /v3/call-notes)",
                "tags": [
                    "Call Notes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AddCallNoteRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/call-notes": {
            "post": {
                "operationId": "v3.call-notes.store",
                "description": "POST /v2/call-notes is a second path onto the same operation and behaves identically.\nReading notes back has no counterpart here \u2014 GET /v2/call-notes returns the notes of\ngiven calls.",
                "summary": "Add a note to a call",
                "tags": [
                    "Call Notes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CallNotesRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/call-tags": {
            "get": {
                "operationId": "callLog.callTags",
                "description": "Reads assignments, not the tag catalogue: GET /v3/call-tags lists the tags an account has\ndefined, this returns which of them are on the calls you name.",
                "summary": "List the tags assigned to specific calls",
                "tags": [
                    "Call Tags"
                ],
                "parameters": [
                    {
                        "name": "callIDs",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/CallTagInfo"
                                    }
                                }
                            }
                        }
                    },
                    "406": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "boolean"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/add-call-tag": {
            "post": {
                "operationId": "v2.addCallTag",
                "description": "Attaches an existing tag to one call; POST /v3/call-tags creates a tag in the catalogue\ninstead. Take `tag_info_id` from GET /v3/call-tags.",
                "summary": "Assign a catalogue tag to a call",
                "tags": [
                    "Call Tags"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AddCallTagRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/tags/{id}": {
            "delete": {
                "operationId": "tags.destroy",
                "description": "Removes the tag and detaches it from every call, one webhook per detached call. It does\nnot touch child tags or CRM tag mappings \u2014 DELETE /v3/call-tags/{callTag} does both.",
                "summary": "Delete a catalogue tag (this tag only, keeps child tags)",
                "tags": [
                    "Call Tags"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Call tag ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/call-tags/all-parent-child": {
            "get": {
                "operationId": "callTagInfo.allParentChild",
                "summary": "List the whole call tag catalogue, parents and children",
                "tags": [
                    "Call Tags"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/CallTagInfoResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/call-tags": {
            "get": {
                "operationId": "v3.call-tags.index",
                "description": "The tags an account has defined, parents only, each with its child count. GET /v2/call-tags\nis a different thing: the tags already assigned to calls you name.",
                "summary": "List the call tag catalogue",
                "tags": [
                    "Call Tags"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": true,
                        "description": "Current page number",
                        "schema": {
                            "type": "string",
                            "minLength": 1
                        },
                        "example": 1
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "required": true,
                        "description": "Rows per page",
                        "schema": {
                            "type": "number",
                            "enum": [
                                "15",
                                "25",
                                "50",
                                "100",
                                "-1"
                            ]
                        },
                        "example": 15
                    },
                    {
                        "name": "filter[]",
                        "in": "query",
                        "description": "Filters to apply",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sorting fields, comma separated. Prefix with '-' for descending",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-id"
                    },
                    {
                        "name": "filter[name]",
                        "in": "query",
                        "description": "Partial match by tag name",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Support"
                    },
                    {
                        "name": "filter[color]",
                        "in": "query",
                        "description": "Partial match by tag color (hex code)",
                        "schema": {
                            "type": "string"
                        },
                        "example": "#ff0000"
                    },
                    {
                        "name": "filter[available_for]",
                        "in": "query",
                        "description": "Filter by call availability (1 all calls, 2 inbound, 3 outbound). Tags available for all calls are always included",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 2
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/CallTagInfoResource"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v3.call-tags.store",
                "description": "Defines a tag for the account; it is not attached to any call. Assign it to a call with\nPOST /v2/add-call-tag.",
                "summary": "Create a catalogue tag",
                "tags": [
                    "Call Tags"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CallTagInfoRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CallTagInfoResource"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/call-tags/{callTag}": {
            "get": {
                "operationId": "v3.call-tags.show",
                "summary": "Show a catalogue tag",
                "tags": [
                    "Call Tags"
                ],
                "parameters": [
                    {
                        "name": "callTag",
                        "in": "path",
                        "required": true,
                        "description": "Call Tag Info ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    },
                    {
                        "name": "available_for",
                        "in": "query",
                        "description": "Limit child tags by call availability (1 all calls, 2 inbound, 3 outbound). Tags available for all calls are always included",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 2
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CallTagInfoResource"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "v3.call-tags.update",
                "summary": "Update a catalogue tag",
                "tags": [
                    "Call Tags"
                ],
                "parameters": [
                    {
                        "name": "callTag",
                        "in": "path",
                        "required": true,
                        "description": "Call Tag Info ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CallTagInfoRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CallTagInfoResource"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v3.call-tags.destroy",
                "description": "Deletes the whole subtree, its assignments on calls and the ActiveCampaign and HubSpot tag\nmappings. DELETE /v2/tags/{id} deletes the single tag and its assignments only.",
                "summary": "Delete a catalogue tag and its children",
                "tags": [
                    "Call Tags"
                ],
                "parameters": [
                    {
                        "name": "callTag",
                        "in": "path",
                        "required": true,
                        "description": "Call Tag Info ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/account/call-rates": {
            "get": {
                "operationId": "v2.getAccountCallRates",
                "summary": "Get the call rates of a country from the account's rate card",
                "tags": [
                    "Call Rates"
                ],
                "parameters": [
                    {
                        "name": "country_code",
                        "in": "query",
                        "required": true,
                        "description": "Two-letter country code; `XS` is International Satellite @example \"IE\"",
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 2
                        },
                        "example": "IE"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/CallRateResource"
                                            }
                                        },
                                        "currency": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "currency"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/account/call-rates-countries": {
            "get": {
                "operationId": "v2.getAccountCallRatesCountries",
                "summary": "Get the countries that have at least one call rate in the account's rate card",
                "tags": [
                    "Call Rates"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/CallRateCountryResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/request-callback": {
            "post": {
                "operationId": "v2.requestCallbackAction",
                "summary": "Request a callback",
                "tags": [
                    "Callbacks"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RequestCallBackActionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/after-call-work/settings": {
            "get": {
                "operationId": "v2.afterCallWorkSettings",
                "summary": "Get after call work rule by direction and number or queue",
                "tags": [
                    "After Call Work"
                ],
                "parameters": [
                    {
                        "name": "direction",
                        "in": "query",
                        "required": true,
                        "description": "Call direction",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "inbound",
                                "outbound"
                            ]
                        },
                        "example": "inbound"
                    },
                    {
                        "name": "number",
                        "in": "query",
                        "description": "Call number",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "example": "0918630235840"
                    },
                    {
                        "name": "queue_id",
                        "in": "query",
                        "description": "Call queue identifier",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "example": "10"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/after-call-work/upsert": {
            "put": {
                "operationId": "v2.afterCallWorkUpsert",
                "summary": "Insert or update after call work rules",
                "tags": [
                    "After Call Work"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AfterCallWorkUpsertRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/after-call-work": {
            "get": {
                "operationId": "after-call-work.index",
                "summary": "List after call work rules",
                "tags": [
                    "After Call Work"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/after-call-work/{id}": {
            "delete": {
                "operationId": "after-call-work.destroy",
                "summary": "Delete an after call work rule",
                "tags": [
                    "After Call Work"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "After call work rule ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/calls/ai-data": {
            "get": {
                "operationId": "v2.listCallAiData",
                "description": "Lists AI-generated analysis (summary, transcription, topics, action items,\nsentiment) for the account's calls within a date range. The calls for the\nperiod are resolved first (paginated), then their AI data is looked up;\nonly calls that actually have AI data are returned. Each\nitem is tagged with its call id and date.",
                "summary": "List call AI data",
                "tags": [
                    "Call AI"
                ],
                "parameters": [
                    {
                        "name": "date_from",
                        "in": "query",
                        "required": true,
                        "description": "Start date or datetime",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "example": "2026-06-01 00:00:00"
                    },
                    {
                        "name": "date_to",
                        "in": "query",
                        "required": true,
                        "description": "End date or datetime",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "example": "2026-06-30 23:59:59"
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        },
                        "example": 1
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Results per page",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        },
                        "example": 25
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                ""
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/calls/{callId}/ai-data": {
            "get": {
                "operationId": "v2.getCallAiData",
                "summary": "Get call AI data",
                "tags": [
                    "Call AI"
                ],
                "parameters": [
                    {
                        "name": "format",
                        "in": "query",
                        "description": "Response format (json or xml)",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "json",
                                "xml"
                            ]
                        },
                        "example": "json"
                    },
                    {
                        "name": "callId",
                        "in": "path",
                        "required": true,
                        "description": "Call unique ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "anyOf": [
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "summary": {
                                                            "type": "string",
                                                            "examples": [
                                                                "Customer called about billing issue and requested a refund."
                                                            ]
                                                        },
                                                        "transcription": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "channel": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "text": {
                                                                        "anyOf": [
                                                                            {
                                                                                "type": "string"
                                                                            },
                                                                            {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                    ""
                                                                                ]
                                                                            }
                                                                        ]
                                                                    }
                                                                },
                                                                "required": [
                                                                    "channel",
                                                                    "text"
                                                                ]
                                                            }
                                                        },
                                                        "topics": {
                                                            "type": "array",
                                                            "examples": [
                                                                [
                                                                    "billing",
                                                                    "refund"
                                                                ]
                                                            ],
                                                            "items": {}
                                                        },
                                                        "actionItems": {
                                                            "type": "array",
                                                            "examples": [
                                                                [
                                                                    "Follow up with customer"
                                                                ]
                                                            ],
                                                            "items": {}
                                                        },
                                                        "averageSentiment": {
                                                            "type": "string",
                                                            "examples": [
                                                                "Positive"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "summary",
                                                        "transcription",
                                                        "topics",
                                                        "actionItems",
                                                        "averageSentiment"
                                                    ]
                                                },
                                                {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0,
                                                    "additionalItems": false
                                                }
                                            ]
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "No AI data available for this callId"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/speech-to-text/{callUniqueId}/highlight": {
            "post": {
                "operationId": "speechToText.getHighlightedCallSTT",
                "summary": "Get Call Recording Speech to Text data with highlighted search",
                "tags": [
                    "Speech To Text"
                ],
                "parameters": [
                    {
                        "name": "callUniqueId",
                        "in": "path",
                        "required": true,
                        "description": "Unique ID of the call recording",
                        "schema": {
                            "type": "string"
                        },
                        "example": "135321"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/GetHighlightedCallSTTRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CallSpeechToTextResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/speech-to-text/{callUniqueId}": {
            "get": {
                "operationId": "speechToText.getCallSTT",
                "summary": "Get Call Recording Speech to Text data",
                "tags": [
                    "Speech To Text"
                ],
                "parameters": [
                    {
                        "name": "callUniqueId",
                        "in": "path",
                        "required": true,
                        "description": "Unique ID of the call recording",
                        "schema": {
                            "type": "string"
                        },
                        "example": "135321"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CallSpeechToTextResource"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/speech-to-text/active": {
            "get": {
                "operationId": "accountAddonStt.currentAddon",
                "summary": "Get current active AI Analysis addon",
                "tags": [
                    "Speech To Text / Subscription"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/speech-to-text/calculate/{addonId}": {
            "get": {
                "operationId": "accountAddonStt.calculate",
                "summary": "Calculate addon cost from today till end of the month",
                "tags": [
                    "Speech To Text / Subscription"
                ],
                "parameters": [
                    {
                        "name": "addonId",
                        "in": "path",
                        "required": true,
                        "description": "Addon ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": "1128"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AddonCostData"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "An error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Addon not found"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/speech-to-text/deactivate": {
            "delete": {
                "operationId": "accountAddonStt.deactivate",
                "description": "Refused (422) while AI licences are assigned to extensions.",
                "summary": "Deactivate Account STT",
                "tags": [
                    "Speech To Text / Subscription"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/LicensingOperationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/speech-to-text/upgrade": {
            "post": {
                "operationId": "accountAddonStt.upgrade",
                "description": "Refused (422) while the add-on it replaces is assigned to extensions.",
                "summary": "Activate STT addon for account",
                "tags": [
                    "Speech To Text / Subscription"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ActivateAiSttRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/speech-to-text/downgrade": {
            "post": {
                "operationId": "accountAddonStt.downgrade",
                "description": "Refused (422) while the add-on it replaces is assigned to extensions.",
                "summary": "Downgrade STT addon for account",
                "tags": [
                    "Speech To Text / Subscription"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/DowngradeAiSttRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/keyword-trackers": {
            "get": {
                "operationId": "keyword-trackers.index",
                "summary": "List keyword trackers",
                "tags": [
                    "Keyword Tracker"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/KeywordTrackerResource"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "keyword-trackers.store",
                "summary": "Create a keyword tracker",
                "tags": [
                    "Keyword Tracker"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreKeywordTrackerRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/KeywordTrackerResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/v2/keyword-trackers/{trackerId}": {
            "get": {
                "operationId": "keyword-trackers.show",
                "summary": "Show a keyword tracker",
                "tags": [
                    "Keyword Tracker"
                ],
                "parameters": [
                    {
                        "name": "trackerId",
                        "in": "path",
                        "required": true,
                        "description": "Keyword Tracker ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/KeywordTrackerResource"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "keyword-trackers.update",
                "summary": "Update a keyword tracker",
                "tags": [
                    "Keyword Tracker"
                ],
                "parameters": [
                    {
                        "name": "trackerId",
                        "in": "path",
                        "required": true,
                        "description": "Keyword Tracker ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreKeywordTrackerRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/KeywordTrackerResource"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "keyword-trackers.destroy",
                "summary": "Delete a keyword tracker",
                "tags": [
                    "Keyword Tracker"
                ],
                "parameters": [
                    {
                        "name": "trackerId",
                        "in": "path",
                        "required": true,
                        "description": "Keyword Tracker ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    }
                }
            }
        },
        "/v2/keyword-trackers/{trackerId}/status/{status}": {
            "patch": {
                "operationId": "keywordTracker.setKeywordTrackerStatus",
                "summary": "Update keyword tracker status",
                "tags": [
                    "Keyword Tracker"
                ],
                "parameters": [
                    {
                        "name": "trackerId",
                        "in": "path",
                        "required": true,
                        "description": "Keyword Tracker ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "status",
                        "in": "path",
                        "required": true,
                        "description": "Status flag (0 = disabled, 1 = enabled)",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/KeywordTrackerResource"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/v2/auto-dialer/calls": {
            "get": {
                "operationId": "autodialer.autodialerCall",
                "description": "Lists the dial records across the account's campaigns, optionally filtered\nby campaign, agent (campaign sign_to extension), status and date range.",
                "summary": "List auto-dialer calls",
                "tags": [
                    "Autodialer"
                ],
                "parameters": [
                    {
                        "name": "campaign_id",
                        "in": "query",
                        "description": "Filter by campaign ID",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        },
                        "example": 12
                    },
                    {
                        "name": "agent",
                        "in": "query",
                        "description": "Filter by agent extension (campaign sign_to)",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 50
                        },
                        "example": "32"
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Filter by call status",
                        "schema": {
                            "anyOf": [
                                {
                                    "$ref": "#/components/schemas/AutodialerCampaignNumberStatus"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        },
                        "example": "answered"
                    },
                    {
                        "name": "date_from",
                        "in": "query",
                        "description": "Return calls created on or after this point; a bare date (Y-m-d) is the start of that day",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date"
                        },
                        "example": "2026-06-01 09:00:00"
                    },
                    {
                        "name": "date_to",
                        "in": "query",
                        "description": "Return calls created on or before this point; a bare date (Y-m-d) is the end of that day",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date"
                        },
                        "example": "2026-06-30 17:00:00"
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Results per page",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 1000
                        },
                        "example": 50
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/AutodialerCampaignNumberResource"
                                            }
                                        },
                                        "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"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/auto-dialer/campaigns": {
            "get": {
                "operationId": "campaigns.index",
                "summary": "List autodialer campaigns",
                "tags": [
                    "Autodialer"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Filter campaigns by status",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 50
                        },
                        "example": "in_progress"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/AutodialerCampaignResource"
                                            }
                                        },
                                        "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"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "campaigns.store",
                "summary": "Create an autodialer campaign",
                "tags": [
                    "Autodialer"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AutodialerCampaignStoreRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AutodialerCampaignResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/auto-dialer/campaigns/{campaignId}": {
            "get": {
                "operationId": "campaigns.show",
                "summary": "Show an autodialer campaign",
                "tags": [
                    "Autodialer"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "description": "Campaign ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": 1
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AutodialerCampaignResource"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "campaigns.update",
                "summary": "Update an autodialer campaign",
                "tags": [
                    "Autodialer"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "description": "Campaign ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": 1
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AutodialerCampaignUpdateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AutodialerCampaignResource"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "campaigns.destroy",
                "summary": "Delete an autodialer campaign",
                "tags": [
                    "Autodialer"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "description": "Campaign ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": 1
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/auto-dialer/campaigns/{campaignId}/stats": {
            "get": {
                "operationId": "autodialerCampaign.stats",
                "summary": "Show statistics for an autodialer campaign",
                "tags": [
                    "Autodialer"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "description": "Campaign ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": 1
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "answered": {
                                            "type": "string"
                                        },
                                        "not_answered": {
                                            "type": "string"
                                        },
                                        "all": {
                                            "type": "string"
                                        },
                                        "percentage": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "answered",
                                        "not_answered",
                                        "all",
                                        "percentage"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/auto-dialer/campaign/{campaignId}/numbers": {
            "get": {
                "operationId": "numbers.index",
                "summary": "List campaign numbers",
                "tags": [
                    "Autodialer"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "description": "Campaign ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": 1
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/AutodialerCampaignNumberResource"
                                            }
                                        },
                                        "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": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "numbers.store",
                "summary": "Create a campaign number",
                "tags": [
                    "Autodialer"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "description": "Campaign ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": 999
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AutodialerCampaignNumberRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AutodialerCampaignNumberResource"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {}
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/auto-dialer/campaign/{campaignId}/numbers/{numberId}": {
            "get": {
                "operationId": "numbers.show",
                "summary": "Show a campaign number",
                "tags": [
                    "Autodialer"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "description": "Campaign ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": 999
                    },
                    {
                        "name": "numberId",
                        "in": "path",
                        "required": true,
                        "description": "Number ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": 999
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AutodialerCampaignNumberResource"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "numbers.update",
                "summary": "Update a campaign number",
                "tags": [
                    "Autodialer"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "description": "Campaign ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": 1
                    },
                    {
                        "name": "numberId",
                        "in": "path",
                        "required": true,
                        "description": "Number ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": 1
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AutodialerCampaignNumberRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AutodialerCampaignNumberResource"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "numbers.destroy",
                "summary": "Delete a campaign number",
                "tags": [
                    "Autodialer"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "description": "Campaign ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": 1
                    },
                    {
                        "name": "numberId",
                        "in": "path",
                        "required": true,
                        "description": "Number ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": 1
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/auto-dialer/campaign/{campaignId}/numbers/upload": {
            "post": {
                "operationId": "autodialerCampaignNumber.upload",
                "summary": "Upload campaign numbers in bulk",
                "tags": [
                    "Autodialer"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "description": "Campaign ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": 1
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AutodialerCampaignNumberUploadRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/extension-call-direction-report": {
            "post": {
                "operationId": "callLog.directionExtensionUsage",
                "summary": "Report extension usage by call direction",
                "tags": [
                    "Reports"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "array",
                                        "items": {}
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/extension-call-duration-report": {
            "post": {
                "operationId": "callLog.durationExtensionUsage",
                "summary": "Report extension usage by call duration",
                "tags": [
                    "Reports"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "array",
                                        "items": {}
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/hourly-busy-hours-report": {
            "post": {
                "operationId": "callLog.hourlyBusyHours",
                "summary": "Report busy hours grouped by hourly timeline",
                "tags": [
                    "Reports"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    },
                                    "minItems": 0,
                                    "maxItems": 0,
                                    "additionalItems": false
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/daily-busy-hours-report": {
            "post": {
                "operationId": "callLog.dailyBusyHours",
                "summary": "Report busy hours grouped by daily timeline",
                "tags": [
                    "Reports"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    },
                                    "minItems": 0,
                                    "maxItems": 0,
                                    "additionalItems": false
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/monthly-busy-hours-report": {
            "post": {
                "operationId": "callLog.monthlyBusyHours",
                "summary": "Report busy hours grouped by monthly timeline",
                "tags": [
                    "Reports"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    },
                                    "minItems": 0,
                                    "maxItems": 0,
                                    "additionalItems": false
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/top-callers-report": {
            "get": {
                "operationId": "callLog.topCallers",
                "summary": "Report top callers by inbound or outbound direction",
                "tags": [
                    "Reports"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "_embedded": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "total_items": {
                                            "type": "integer",
                                            "const": 20
                                        }
                                    },
                                    "required": [
                                        "_embedded",
                                        "total_items"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/missed-call-report": {
            "get": {
                "operationId": "callLog.missedCalls",
                "summary": "List missed calls with pagination",
                "tags": [
                    "Reports"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "_embedded": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "minItems": 0,
                                            "maxItems": 0,
                                            "additionalItems": false
                                        },
                                        "_links": {
                                            "type": "string"
                                        },
                                        "page_count": {
                                            "type": "string"
                                        },
                                        "page_size": {
                                            "type": "string"
                                        },
                                        "total_items": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "_embedded",
                                        "_links",
                                        "page_count",
                                        "page_size",
                                        "total_items"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/missed-call-report-export": {
            "post": {
                "operationId": "callLog.missedCallsExport",
                "summary": "Export missed calls as CSV",
                "tags": [
                    "Reports"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/admin-missed-call-report": {
            "get": {
                "operationId": "callLog.missedCallsAdmin",
                "summary": "List missed calls for admin (all extensions)",
                "tags": [
                    "Reports"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "_embedded": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "minItems": 0,
                                            "maxItems": 0,
                                            "additionalItems": false
                                        },
                                        "_links": {
                                            "type": "string"
                                        },
                                        "page_count": {
                                            "type": "string"
                                        },
                                        "page_size": {
                                            "type": "string"
                                        },
                                        "total_items": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "_embedded",
                                        "_links",
                                        "page_count",
                                        "page_size",
                                        "total_items"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/admin-missed-call-report-export": {
            "post": {
                "operationId": "callLog.missedCallsAdminExport",
                "summary": "Export missed calls for admin as CSV",
                "tags": [
                    "Reports"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/reports/queue-skipped-calls": {
            "get": {
                "operationId": "v2.getQueueSkippedCalls",
                "summary": "Get queue skipped calls",
                "tags": [
                    "Reports"
                ],
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": true,
                        "description": "From date",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "example": "2024-01-01"
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": true,
                        "description": "To date",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "example": "2024-01-31"
                    },
                    {
                        "name": "queue",
                        "in": "query",
                        "required": true,
                        "description": "Queue number",
                        "schema": {
                            "type": "number"
                        },
                        "example": 100
                    },
                    {
                        "name": "agent",
                        "in": "query",
                        "description": "Agent number",
                        "schema": {
                            "type": "number"
                        },
                        "example": 10
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/SkippedCallStatusResource"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/missed-call-followup-settings/{reportId}": {
            "get": {
                "operationId": "missedCallFollowupSetting.show",
                "summary": "Show missed call followup settings",
                "tags": [
                    "Reports / Missed Call Follow-up"
                ],
                "parameters": [
                    {
                        "name": "reportId",
                        "in": "path",
                        "required": true,
                        "description": "Report ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "account_id": {
                                                            "type": "string"
                                                        },
                                                        "report_id": {
                                                            "type": "integer"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "period": {
                                                            "type": "string"
                                                        },
                                                        "hour": {
                                                            "type": "string"
                                                        },
                                                        "timezone": {
                                                            "type": "string"
                                                        },
                                                        "is_enabled": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "account_id",
                                                        "report_id",
                                                        "email",
                                                        "period",
                                                        "hour",
                                                        "timezone",
                                                        "is_enabled"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "No settings found for this report."
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "missedCallFollowupSetting.destroy",
                "summary": "Delete missed call followup settings",
                "tags": [
                    "Reports / Missed Call Follow-up"
                ],
                "parameters": [
                    {
                        "name": "reportId",
                        "in": "path",
                        "required": true,
                        "description": "Report ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Settings deleted successfully."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "No settings found to delete."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/missed-call-followup-settings": {
            "post": {
                "operationId": "missedCallFollowupSetting.store",
                "summary": "Create or update missed call followup settings",
                "tags": [
                    "Reports / Missed Call Follow-up"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/MissedCallFollowupSettingRequest"
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "is_enabled": {
                                                "type": "boolean",
                                                "default": true
                                            }
                                        }
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Settings saved successfully."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "account_id": {
                                                    "type": "string"
                                                },
                                                "report_id": {
                                                    "type": "integer"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "period": {
                                                    "type": "string"
                                                },
                                                "hour": {
                                                    "type": "string"
                                                },
                                                "timezone": {
                                                    "type": "string"
                                                },
                                                "is_enabled": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "account_id",
                                                "report_id",
                                                "email",
                                                "period",
                                                "hour",
                                                "timezone",
                                                "is_enabled"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/missed-call-followup-settings/{reportId}/send-now": {
            "post": {
                "operationId": "missedCallFollowupSetting.sendNow",
                "summary": "Send missed call followup report immediately",
                "tags": [
                    "Reports / Missed Call Follow-up"
                ],
                "parameters": [
                    {
                        "name": "reportId",
                        "in": "path",
                        "required": true,
                        "description": "Report ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Report has been queued and will be sent shortly."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "No settings found for this report. Please configure email settings first."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "This endpoint is not available for your account."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/conversations": {
            "get": {
                "operationId": "conversation.index",
                "summary": "List conversations",
                "tags": [
                    "Conversations"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "example": 1
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Items per page",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 15
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search term",
                        "schema": {
                            "type": "string",
                            "maxLength": 255
                        },
                        "example": "John"
                    },
                    {
                        "name": "channel",
                        "in": "query",
                        "description": "Channel type filter",
                        "schema": {
                            "type": "integer",
                            "enum": [
                                "1",
                                "2",
                                "3"
                            ]
                        },
                        "example": 1
                    },
                    {
                        "name": "is_active",
                        "in": "query",
                        "description": "Active status filter",
                        "schema": {
                            "type": "boolean"
                        },
                        "example": true
                    },
                    {
                        "name": "from_date",
                        "in": "query",
                        "description": "Start date filter",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "example": "2026-01-01"
                    },
                    {
                        "name": "to_date",
                        "in": "query",
                        "description": "End date filter",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "example": "2026-01-31"
                    },
                    {
                        "name": "is_group",
                        "in": "query",
                        "description": "Group conversation filter",
                        "schema": {
                            "type": "boolean"
                        },
                        "example": false
                    },
                    {
                        "name": "expires_in_hours",
                        "in": "query",
                        "description": "Filter by expiration hours",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "example": 24
                    },
                    {
                        "name": "unread",
                        "in": "query",
                        "description": "Unread filter (0 or 1)",
                        "schema": {
                            "type": "integer",
                            "enum": [
                                "0",
                                "1"
                            ]
                        },
                        "example": 1
                    },
                    {
                        "name": "unassigned",
                        "in": "query",
                        "description": "Unassigned filter (0 or 1)",
                        "schema": {
                            "type": "integer",
                            "enum": [
                                "0",
                                "1"
                            ]
                        },
                        "example": 0
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Message status filter",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "0",
                                "1",
                                "2",
                                "3",
                                "4",
                                "5",
                                "6"
                            ]
                        },
                        "example": "delivered"
                    },
                    {
                        "name": "assigned_to_id",
                        "in": "query",
                        "description": "Assigned user ID filter",
                        "schema": {
                            "type": "string"
                        },
                        "example": "123"
                    },
                    {
                        "name": "sorts",
                        "in": "query",
                        "description": "Comma-separated sort fields",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-last_message_at"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ConversationResource"
                                            }
                                        },
                                        "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"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "conversation.store",
                "summary": "Create a conversation",
                "tags": [
                    "Conversations"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateConversationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "400": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "error_code": {
                                            "type": "integer",
                                            "const": 6005
                                        },
                                        "error": {
                                            "type": "string",
                                            "const": "SMS_ERROR"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "error_code",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string"
                                                },
                                                "success_count": {
                                                    "type": "integer"
                                                },
                                                "failed_count": {
                                                    "type": "integer"
                                                },
                                                "total_count": {
                                                    "type": "integer"
                                                },
                                                "warning_code": {
                                                    "type": "integer",
                                                    "const": 6008
                                                },
                                                "warning": {
                                                    "type": "string",
                                                    "const": "SMS_BULK_SEND_PARTIAL_FAILURE"
                                                },
                                                "warning_detail": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "success_count",
                                                "failed_count",
                                                "total_count",
                                                "warning_code",
                                                "warning",
                                                "warning_detail"
                                            ]
                                        },
                                        {
                                            "$ref": "#/components/schemas/ConversationResource"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "402": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Failed to send messages: Insufficient credit available"
                                        },
                                        "success_count": {
                                            "type": "string"
                                        },
                                        "failed_count": {
                                            "type": "string"
                                        },
                                        "total_count": {
                                            "type": "integer"
                                        },
                                        "error_code": {
                                            "type": "integer",
                                            "const": 6001
                                        },
                                        "error": {
                                            "type": "string",
                                            "const": "SMS_INSUFFICIENT_CREDIT"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "success_count",
                                        "failed_count",
                                        "total_count",
                                        "error_code",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/conversations/unread-count": {
            "get": {
                "operationId": "conversation.unreadCount",
                "summary": "Get unread messages count for current user",
                "tags": [
                    "Conversations"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "unread_count": {
                                            "type": "integer"
                                        },
                                        "user_id": {
                                            "type": "string"
                                        },
                                        "account_id": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "unread_count",
                                        "user_id",
                                        "account_id"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/conversations/{conversation}": {
            "get": {
                "operationId": "conversation.show",
                "description": "Messages are returned in full by default to preserve existing behaviour. When\nthe `page` query parameter is supplied the messages relation is paginated;\n`per_page` (default 20, max 100) is honoured only in that case. When `page`\nis absent, `per_page` is ignored and every non-draft message is returned.",
                "summary": "Show a conversation",
                "tags": [
                    "Conversations"
                ],
                "parameters": [
                    {
                        "name": "conversation",
                        "in": "path",
                        "required": true,
                        "description": "Conversation ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string",
                                                    "examples": [
                                                        "conv_xyz789"
                                                    ]
                                                },
                                                "external_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "examples": [
                                                        "ext_123"
                                                    ]
                                                },
                                                "channel_type": {
                                                    "type": "integer",
                                                    "examples": [
                                                        1
                                                    ]
                                                },
                                                "title": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "examples": [
                                                        "Support Chat"
                                                    ]
                                                },
                                                "is_group": {
                                                    "type": "boolean",
                                                    "examples": [
                                                        false
                                                    ]
                                                },
                                                "owner_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "examples": [
                                                        42
                                                    ]
                                                },
                                                "assigned_to_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "examples": [
                                                        10
                                                    ]
                                                },
                                                "assigned_department_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "examples": [
                                                        5
                                                    ]
                                                },
                                                "last_message_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time",
                                                    "examples": [
                                                        "2024-01-15T10:30:00+00:00"
                                                    ]
                                                },
                                                "last_read_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time",
                                                    "examples": [
                                                        "2024-01-15T10:25:00+00:00"
                                                    ]
                                                },
                                                "is_pinned": {
                                                    "type": "boolean",
                                                    "examples": [
                                                        false
                                                    ]
                                                },
                                                "account_id": {
                                                    "type": "string",
                                                    "examples": [
                                                        "IE-12345"
                                                    ]
                                                },
                                                "is_active": {
                                                    "type": "boolean",
                                                    "examples": [
                                                        true
                                                    ]
                                                },
                                                "sender_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "examples": [
                                                        "NUACOM"
                                                    ]
                                                },
                                                "expires_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time",
                                                    "description": "Time-to-respond deadline. Set when an inbound message arrives on\na number with a configured TTR rule; cleared when the next\noutbound reply is sent.",
                                                    "examples": [
                                                        "2024-02-15T10:30:00+00:00"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time",
                                                    "examples": [
                                                        "2024-01-15T10:00:00+00:00"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time",
                                                    "examples": [
                                                        "2024-01-15T10:30:00+00:00"
                                                    ]
                                                },
                                                "participants": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/ParticipantResource"
                                                    }
                                                },
                                                "messages": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/components/schemas/MessageResource"
                                                            }
                                                        },
                                                        {
                                                            "type": "object"
                                                        }
                                                    ]
                                                },
                                                "channels": {
                                                    "description": "Distinct channel types observed across this conversation's non-draft messages.\nPopulated only on the show endpoint; defaults to an empty list elsewhere.",
                                                    "examples": [
                                                        [
                                                            1,
                                                            2
                                                        ]
                                                    ],
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "minItems": 0,
                                                            "maxItems": 0,
                                                            "additionalItems": false
                                                        }
                                                    ]
                                                },
                                                "unread_count": {
                                                    "examples": [
                                                        3
                                                    ],
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "integer",
                                                            "enum": [
                                                                0
                                                            ]
                                                        }
                                                    ]
                                                },
                                                "messages_pagination": {
                                                    "type": "object",
                                                    "properties": {
                                                        "current_page": {
                                                            "type": "integer"
                                                        },
                                                        "per_page": {
                                                            "type": "integer"
                                                        },
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "last_page": {
                                                            "type": "integer"
                                                        },
                                                        "from": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "to": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "current_page",
                                                        "per_page",
                                                        "total",
                                                        "last_page",
                                                        "from",
                                                        "to"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "external_id",
                                                "channel_type",
                                                "title",
                                                "is_group",
                                                "owner_id",
                                                "assigned_to_id",
                                                "assigned_department_id",
                                                "last_message_at",
                                                "last_read_at",
                                                "is_pinned",
                                                "account_id",
                                                "is_active",
                                                "sender_id",
                                                "expires_at",
                                                "created_at",
                                                "updated_at",
                                                "participants",
                                                "messages",
                                                "channels",
                                                "unread_count",
                                                "messages_pagination"
                                            ]
                                        },
                                        {
                                            "$ref": "#/components/schemas/ConversationResource"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/conversations/{conversation}/messages": {
            "post": {
                "operationId": "conversation.addMessage",
                "summary": "Add a message to a conversation",
                "tags": [
                    "Conversations"
                ],
                "parameters": [
                    {
                        "name": "conversation",
                        "in": "path",
                        "required": true,
                        "description": "Conversation ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/AddMessageRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MessageResource"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Error sending message"
                                        },
                                        "error_code": {
                                            "type": "integer",
                                            "const": 6006
                                        },
                                        "error": {
                                            "type": "string",
                                            "const": "SMS_ERROR"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "error_code",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "402": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "resultCode": {
                                            "type": "string"
                                        },
                                        "error_code": {
                                            "type": "integer",
                                            "const": 6001
                                        },
                                        "error": {
                                            "type": "string",
                                            "const": "SMS_ERROR"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "resultCode",
                                        "error_code",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/conversations/{conversation}/messages/{message}": {
            "delete": {
                "operationId": "conversation.cancelScheduledMessage",
                "summary": "Cancel a scheduled message",
                "tags": [
                    "Conversations"
                ],
                "parameters": [
                    {
                        "name": "conversation",
                        "in": "path",
                        "required": true,
                        "description": "Conversation ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "message",
                        "in": "path",
                        "required": true,
                        "description": "Message ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/conversations/{conversation}/archive": {
            "patch": {
                "operationId": "conversation.archive",
                "summary": "Archive a conversation",
                "tags": [
                    "Conversations"
                ],
                "parameters": [
                    {
                        "name": "conversation",
                        "in": "path",
                        "required": true,
                        "description": "The conversation ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "string"
                                        },
                                        "message": {
                                            "type": "string",
                                            "enum": [
                                                "Conversation archived successfully",
                                                "Failed to archive conversation"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/conversations/{conversation}/pin": {
            "patch": {
                "operationId": "conversation.pin",
                "summary": "Pin/unpin a conversation",
                "tags": [
                    "Conversations"
                ],
                "parameters": [
                    {
                        "name": "conversation",
                        "in": "path",
                        "required": true,
                        "description": "The conversation ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PinConversationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "string"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/conversations/{conversation}/assign": {
            "patch": {
                "operationId": "conversation.assign",
                "summary": "Assign a conversation to a user",
                "tags": [
                    "Conversations"
                ],
                "parameters": [
                    {
                        "name": "conversation",
                        "in": "path",
                        "required": true,
                        "description": "The conversation ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AssignConversationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "string"
                                        },
                                        "message": {
                                            "type": "string",
                                            "enum": [
                                                "Conversation assigned successfully",
                                                "Failed to assign conversation"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/conversations/{conversation}/read-status": {
            "patch": {
                "operationId": "conversation.changeReadStatus",
                "summary": "Change conversation read status",
                "tags": [
                    "Conversations"
                ],
                "parameters": [
                    {
                        "name": "conversation",
                        "in": "path",
                        "required": true,
                        "description": "Conversation ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ChangeReadStatusRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "string"
                                        },
                                        "message": {
                                            "type": "string",
                                            "enum": [
                                                "Conversation assigned successfully",
                                                "Failed to assign conversation"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/conversations/messages/{messageId}": {
            "get": {
                "operationId": "v2.getMessageInfo",
                "summary": "Get message information",
                "tags": [
                    "Conversations / Messages"
                ],
                "parameters": [
                    {
                        "name": "is-bulk",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    },
                    {
                        "name": "messageId",
                        "in": "path",
                        "required": true,
                        "description": "Message ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "array",
                                            "items": {}
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/conversations/messages/{message}/statuses": {
            "post": {
                "operationId": "v2.getMessageStatuses",
                "summary": "Get message statuses",
                "tags": [
                    "Conversations / Messages"
                ],
                "parameters": [
                    {
                        "name": "message",
                        "in": "path",
                        "required": true,
                        "description": "Message or bulk ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "is-bulk",
                        "in": "query",
                        "description": "Treat the path parameter as a bulk ID and return statuses for all messages in the bulk",
                        "schema": {
                            "type": "boolean"
                        },
                        "example": false
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Partial match by recipient phone number (leading 0 is stripped)",
                        "schema": {
                            "type": "string"
                        },
                        "example": "86123"
                    },
                    {
                        "name": "filter[status]",
                        "in": "query",
                        "description": "Exact match by delivery status (0 pending, 1 sent, 2 delivered, 3 read, 4 failed, 5 scheduled, 6 pending moderation)",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 2
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Status group filter: 0 or 1 pending+sent, 2 or 3 delivered+read, 4 failed",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 2
                    },
                    {
                        "name": "start",
                        "in": "query",
                        "description": "Offset of the first row to return. Default: 0",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 0
                    },
                    {
                        "name": "length",
                        "in": "query",
                        "description": "Number of rows to return. Default: 10",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 10
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "is-bulk": {
                                        "type": "boolean",
                                        "default": false
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "draw": {
                                                    "type": "integer"
                                                },
                                                "recordsTotal": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "recordsFiltered": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "array",
                                                        "prefixItems": [
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "string"
                                                            }
                                                        ],
                                                        "minItems": 3,
                                                        "maxItems": 3,
                                                        "additionalItems": false
                                                    }
                                                }
                                            },
                                            "required": [
                                                "draw",
                                                "recordsTotal",
                                                "recordsFiltered",
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "draw": {
                                                    "type": "integer"
                                                },
                                                "sEcho": {
                                                    "type": "integer"
                                                },
                                                "recordsTotal": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "recordsFiltered": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "iTotalRecords": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "iTotalDisplayRecords": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "array",
                                                        "prefixItems": [
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "string"
                                                            }
                                                        ],
                                                        "minItems": 3,
                                                        "maxItems": 3,
                                                        "additionalItems": false
                                                    }
                                                },
                                                "aaData": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "array",
                                                        "prefixItems": [
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "string"
                                                            }
                                                        ],
                                                        "minItems": 3,
                                                        "maxItems": 3,
                                                        "additionalItems": false
                                                    }
                                                }
                                            },
                                            "required": [
                                                "draw",
                                                "sEcho",
                                                "recordsTotal",
                                                "recordsFiltered",
                                                "iTotalRecords",
                                                "iTotalDisplayRecords",
                                                "data",
                                                "aaData"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/conversations/settings": {
            "get": {
                "operationId": "settings.index",
                "summary": "Show conversation settings",
                "tags": [
                    "Conversations / Settings"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "settings": {
                                            "type": "object",
                                            "properties": {
                                                "auto_assigning": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "time_to_respond": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "auto_assigning",
                                                "time_to_respond"
                                            ]
                                        },
                                        "available_numbers": {
                                            "type": "array",
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "settings",
                                        "available_numbers"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "settings.store",
                "summary": "Update or create conversation settings",
                "tags": [
                    "Conversations / Settings"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreConversationSettingsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "settings": {
                                            "type": "null"
                                        }
                                    },
                                    "required": [
                                        "settings"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/sms": {
            "get": {
                "operationId": "smsMsg.index",
                "summary": "List SMS messages",
                "tags": [
                    "Conversations / SMS"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "schema": {
                            "type": "number",
                            "minimum": 1
                        },
                        "example": 2
                    },
                    {
                        "name": "pageSize",
                        "in": "query",
                        "description": "Rows per page",
                        "schema": {
                            "type": "number"
                        },
                        "example": 15
                    },
                    {
                        "name": "filter",
                        "in": "query",
                        "description": "Filter by text or phone number",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "example": "Jack"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "items": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "direction": {
                                                        "type": "string"
                                                    },
                                                    "date": {
                                                        "type": "string"
                                                    },
                                                    "message": {
                                                        "type": "string"
                                                    },
                                                    "dst_number": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "dst_name": {
                                                        "anyOf": [
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ]
                                                    },
                                                    "src_number": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "src_name": {
                                                        "anyOf": [
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ]
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "direction",
                                                    "date",
                                                    "message",
                                                    "dst_number",
                                                    "dst_name",
                                                    "src_number",
                                                    "src_name",
                                                    "status"
                                                ]
                                            }
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "items",
                                        "total"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/sms/inbox": {
            "get": {
                "operationId": "smsGwInbox.index",
                "summary": "List SMS inbox messages",
                "tags": [
                    "Conversations / SMS"
                ],
                "parameters": [
                    {
                        "name": "iDisplayStart",
                        "in": "query",
                        "description": "Offset of the first row to return. Default: 0",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 0
                    },
                    {
                        "name": "iDisplayLength",
                        "in": "query",
                        "description": "Rows per page. Default: 10",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 10
                    },
                    {
                        "name": "filter",
                        "in": "query",
                        "description": "A number (digits, + and spaces) matches the sender, the receiving number or the message text; any other text matches a shared contact name and returns that contact's messages",
                        "schema": {
                            "type": "string"
                        },
                        "example": "35386"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "_embedded": {
                                            "type": "array",
                                            "examples": [
                                                [
                                                    {
                                                        "date": "2026-04-10 14:30:00",
                                                        "sender": "353861234567",
                                                        "number": "353891234567",
                                                        "number_name_sender": "Anna",
                                                        "number_name_dst": "Sales",
                                                        "message": "Hello",
                                                        "channel_type": 1,
                                                        "message_type": 0,
                                                        "content_url": null,
                                                        "content_filename": null,
                                                        "media_error": null
                                                    }
                                                ]
                                            ],
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "date": {
                                                        "type": "string"
                                                    },
                                                    "dst": {
                                                        "type": "string"
                                                    },
                                                    "message": {
                                                        "type": "string"
                                                    },
                                                    "number": {
                                                        "type": "string"
                                                    },
                                                    "sender": {},
                                                    "number_name_sender": {
                                                        "type": "string"
                                                    },
                                                    "number_name_dst": {
                                                        "type": "string"
                                                    },
                                                    "channel_type": {
                                                        "type": "integer"
                                                    },
                                                    "content_url": {
                                                        "type": "string"
                                                    },
                                                    "message_type": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "media_error": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "code": {
                                                                "type": "string"
                                                            },
                                                            "message": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "code",
                                                            "message"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "date",
                                                    "dst",
                                                    "message",
                                                    "number",
                                                    "sender",
                                                    "number_name_sender",
                                                    "number_name_dst",
                                                    "channel_type",
                                                    "content_url",
                                                    "message_type",
                                                    "media_error"
                                                ]
                                            }
                                        },
                                        "total_items": {
                                            "type": "string",
                                            "examples": [
                                                "42"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "_embedded",
                                        "total_items"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/sms/timeline": {
            "get": {
                "operationId": "smsGwInbox.timeline",
                "summary": "Get SMS and WhatsApp timeline between two numbers",
                "tags": [
                    "Conversations / SMS"
                ],
                "parameters": [
                    {
                        "name": "src_number",
                        "in": "query",
                        "required": true,
                        "description": "One side of the thread, international digits",
                        "schema": {
                            "type": "string"
                        },
                        "example": "353861234567"
                    },
                    {
                        "name": "dst_number",
                        "in": "query",
                        "required": true,
                        "description": "The other side of the thread, international digits",
                        "schema": {
                            "type": "string"
                        },
                        "example": "353891234567"
                    },
                    {
                        "name": "iDisplayStart",
                        "in": "query",
                        "description": "Offset of the first row to return. Default: 0",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 0
                    },
                    {
                        "name": "iDisplayLength",
                        "in": "query",
                        "description": "Rows per page. Default: 100",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 100
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "_embedded": {
                                            "type": "array",
                                            "examples": [
                                                [
                                                    {
                                                        "date": "2026-04-10 14:30:00",
                                                        "sender": "353861234567",
                                                        "number_name_sender": "Anna",
                                                        "message": "Hello",
                                                        "channel_type": 2,
                                                        "message_type": 0,
                                                        "media_error": null
                                                    }
                                                ]
                                            ],
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "date": {
                                                        "type": "string"
                                                    },
                                                    "message": {
                                                        "type": "string"
                                                    },
                                                    "sender": {},
                                                    "number": {
                                                        "type": "string"
                                                    },
                                                    "dst": {
                                                        "type": "string"
                                                    },
                                                    "channel_type": {
                                                        "type": "integer"
                                                    },
                                                    "content_url": {
                                                        "type": "string"
                                                    },
                                                    "message_type": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "has_media": {
                                                        "type": "boolean"
                                                    },
                                                    "media_error": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "code": {
                                                                "type": "string"
                                                            },
                                                            "message": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "code",
                                                            "message"
                                                        ]
                                                    },
                                                    "number_name_sender": {
                                                        "type": "string"
                                                    },
                                                    "number_name_dst": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "date",
                                                    "message",
                                                    "sender",
                                                    "number",
                                                    "dst",
                                                    "channel_type",
                                                    "content_url",
                                                    "message_type",
                                                    "has_media",
                                                    "media_error",
                                                    "number_name_sender",
                                                    "number_name_dst"
                                                ]
                                            }
                                        },
                                        "total_items": {
                                            "type": "integer",
                                            "examples": [
                                                12
                                            ]
                                        }
                                    },
                                    "required": [
                                        "_embedded",
                                        "total_items"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/sms/search-contacts": {
            "get": {
                "operationId": "sms.searchContacts",
                "summary": "Search SMS contacts",
                "tags": [
                    "Conversations / SMS"
                ],
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": true,
                        "description": "Search query (name or phone number)",
                        "schema": {
                            "type": "string"
                        },
                        "example": 353861234567
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "array",
                                            "items": {}
                                        },
                                        {
                                            "type": "array",
                                            "prefixItems": [
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "string"
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                },
                                                                {
                                                                    "type": "null"
                                                                }
                                                            ]
                                                        },
                                                        "number": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "string"
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                },
                                                                {
                                                                    "type": "null"
                                                                }
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "number"
                                                    ]
                                                }
                                            ],
                                            "minItems": 1,
                                            "maxItems": 1,
                                            "additionalItems": false
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/sms/overview": {
            "post": {
                "operationId": "sms.overview",
                "summary": "Get SMS overview",
                "tags": [
                    "Conversations / SMS"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SmsOverviewRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {}
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/sms/send": {
            "post": {
                "operationId": "sms.send",
                "summary": "Send an SMS message",
                "tags": [
                    "Conversations / SMS"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SendSmsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return success response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "array",
                                            "items": {}
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/sms/appointment": {
            "post": {
                "operationId": "sms.storeAppointment",
                "summary": "Create an SMS appointment",
                "tags": [
                    "Conversations / SMS"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreAppointmentRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/sms/history": {
            "post": {
                "operationId": "v2.getSmsMessages",
                "summary": "Get SMS message history",
                "tags": [
                    "Conversations / SMS"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SmsMessagesDataTableRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "500": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "sEcho": {
                                            "type": "integer"
                                        },
                                        "iTotalRecords": {
                                            "type": "integer"
                                        },
                                        "iTotalDisplayRecords": {
                                            "type": "integer"
                                        },
                                        "aaData": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "minItems": 0,
                                            "maxItems": 0,
                                            "additionalItems": false
                                        },
                                        "error": {
                                            "type": "string",
                                            "const": "An error occurred while fetching data"
                                        }
                                    },
                                    "required": [
                                        "sEcho",
                                        "iTotalRecords",
                                        "iTotalDisplayRecords",
                                        "aaData",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "sEcho": {
                                            "type": "integer"
                                        },
                                        "iTotalRecords": {
                                            "type": "string"
                                        },
                                        "iTotalDisplayRecords": {
                                            "type": "string"
                                        },
                                        "aaData": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "additionalProperties": {}
                                            }
                                        }
                                    },
                                    "required": [
                                        "sEcho",
                                        "iTotalRecords",
                                        "iTotalDisplayRecords",
                                        "aaData"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/sms/packages": {
            "get": {
                "operationId": "smsPackages.index",
                "summary": "List SMS packages",
                "tags": [
                    "Conversations / SMS / Packages"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/SmsPackagesResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/sms/sender_names": {
            "get": {
                "operationId": "smsSenderNames.getSenderNames",
                "summary": "List SMS sender names",
                "tags": [
                    "Conversations / SMS / Sender Names"
                ],
                "parameters": [
                    {
                        "name": "filter[channel]",
                        "in": "query",
                        "description": ".channel Filter by channel type",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/sms-sender-name": {
            "post": {
                "operationId": "v2.requestSmsSenderName",
                "summary": "Request a new SMS sender name",
                "tags": [
                    "Conversations / SMS / Sender Names"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/NewSmsSenderNameRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "success"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/sms/templates": {
            "get": {
                "operationId": "templates.index",
                "description": "Page and perPage only. GET /v2/sms-templates lists the same catalogue with sorting and\nthe status, channel, usage and search filters.",
                "summary": "List SMS templates (simple, without filters)",
                "tags": [
                    "Conversations / SMS / Templates"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "schema": {
                            "type": [
                                "number",
                                "null"
                            ],
                            "minimum": 1
                        },
                        "example": 1
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "description": "Items per page (15, 50, or 100)",
                        "schema": {
                            "type": [
                                "number",
                                "null"
                            ],
                            "enum": [
                                "15",
                                "50",
                                "100",
                                null
                            ]
                        },
                        "example": 15
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/sms-templates": {
            "get": {
                "operationId": "sms-templates.index",
                "description": "GET /v2/sms/templates lists the same catalogue with page and perPage only.",
                "summary": "List SMS templates (with sorting and filters)",
                "tags": [
                    "Conversations / SMS / Templates"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Items per page",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                        },
                        "example": 15
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "example": 1
                    },
                    {
                        "name": "additional",
                        "in": "query",
                        "description": "Comma-separated additional fields. Allowed: account_sender_names, campaign_use_cases",
                        "schema": {
                            "type": "string"
                        },
                        "example": "account_sender_names"
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sort field. Allowed: template_id, name. Prefix with - for descending. Default: -template_id",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-template_id"
                    },
                    {
                        "name": "filter[name]",
                        "in": "query",
                        "description": "Partial match by template name",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Welcome"
                    },
                    {
                        "name": "filter[status]",
                        "in": "query",
                        "description": "Exact match by status (0 submitted, 1 approved, 2 error, 3 rejected, 4 disabled, 5 paused, 6 not submitted, 7 pending moderation, 8 pending submit, 9 media rejected). Default: 1",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "filter[channel]",
                        "in": "query",
                        "description": "Exact match by channel, comma-separated for multiple (1 SMS, 2 WhatsApp, 3 MMS). Default: 1",
                        "schema": {
                            "type": "string"
                        },
                        "example": "1,2"
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Partial match by template name or message text",
                        "schema": {
                            "type": "string"
                        },
                        "example": "appointment"
                    },
                    {
                        "name": "filter[usage]",
                        "in": "query",
                        "description": "Filter by usage type, comma-separated for multiple. Allowed: sms, 10dlc, whatsapp",
                        "schema": {
                            "type": "string"
                        },
                        "example": "sms,10dlc"
                    },
                    {
                        "name": "filter[exclude_dynamic_variables]",
                        "in": "query",
                        "description": "When true, excludes WhatsApp templates containing dynamic variables ({{...}})",
                        "schema": {
                            "type": "boolean"
                        },
                        "example": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/SmsTemplateResource"
                                            }
                                        },
                                        "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"
                                            ]
                                        },
                                        "account_sender_names": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "campaign_use_cases": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "value": {
                                                        "type": "string"
                                                    },
                                                    "label": {
                                                        "type": "string"
                                                    },
                                                    "description": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "value",
                                                    "label",
                                                    "description"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta",
                                        "account_sender_names",
                                        "campaign_use_cases"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "sms-templates.store",
                "summary": "Create an SMS template",
                "tags": [
                    "Conversations / SMS / Templates"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreSmsTemplateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SmsTemplateResource"
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Template request submitted successfully. We will get back to you once it has been approved."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/sms-templates/{smsTemplate}": {
            "get": {
                "operationId": "sms-templates.show",
                "summary": "Show an SMS template",
                "tags": [
                    "Conversations / SMS / Templates"
                ],
                "parameters": [
                    {
                        "name": "smsTemplate",
                        "in": "path",
                        "required": true,
                        "description": "SMS template ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SmsTemplateResource"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                ""
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "sms-templates.update",
                "summary": "Update an SMS template",
                "tags": [
                    "Conversations / SMS / Templates"
                ],
                "parameters": [
                    {
                        "name": "smsTemplate",
                        "in": "path",
                        "required": true,
                        "description": "SMS template ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SmsTemplateResource"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "sms-templates.destroy",
                "summary": "Delete an SMS template",
                "tags": [
                    "Conversations / SMS / Templates"
                ],
                "parameters": [
                    {
                        "name": "smsTemplate",
                        "in": "path",
                        "required": true,
                        "description": "SMS template ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "403": {
                        "description": "An error\n\nAn error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        ""
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Templates with campaign configuration cannot be deleted."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/mms/media": {
            "post": {
                "operationId": "mms.uploadMmsMessageMedia",
                "description": "Image and video moderation runs asynchronously; poll `moderation_status` before sending.",
                "summary": "Upload media file for MMS message",
                "tags": [
                    "Conversations / MMS"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/UploadMmsMessageMediaRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "media_id": {
                                            "type": "string"
                                        },
                                        "url": {
                                            "type": "string"
                                        },
                                        "type": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "message_type": {
                                            "type": "integer",
                                            "enum": [
                                                5,
                                                6,
                                                9,
                                                7,
                                                0
                                            ]
                                        },
                                        "size": {
                                            "type": "string"
                                        },
                                        "moderation_status": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "media_id",
                                        "url",
                                        "type",
                                        "message_type",
                                        "size",
                                        "moderation_status"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/mms/media/{mediaId}/moderation-status": {
            "get": {
                "operationId": "mms.getMmsMediaModerationStatus",
                "description": "Media uploaded for an MMS message is moderated asynchronously, so sending straight after the\nupload can fail with \"The image is still being moderated\". Poll this until `moderation_status`\nleaves `pending`, then send. `rejected` is terminal \u2014 stop polling and surface the failure.",
                "summary": "Get MMS media moderation status",
                "tags": [
                    "Conversations / MMS"
                ],
                "parameters": [
                    {
                        "name": "mediaId",
                        "in": "path",
                        "required": true,
                        "description": "MMS media ID returned by the upload endpoint",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MmsMediaModerationStatusResource"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/integrations/whatsapp/media": {
            "post": {
                "operationId": "integrations.whatsapp.media.upload",
                "description": "Images and videos are moderated asynchronously; send the message once `moderation_status`\nis `approved` (audio and documents are approved on upload).",
                "summary": "Upload media file for WhatsApp message",
                "tags": [
                    "Conversations / WhatsApp"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/UploadWhatsappMessageMediaRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "media_id": {
                                            "type": "string",
                                            "examples": [
                                                "5f180090-bf82-4869-9114-7ba1f7cb6e55"
                                            ]
                                        },
                                        "url": {
                                            "type": "string",
                                            "description": "Signed preview URL",
                                            "examples": [
                                                "https://api.api-nuacom.com/v2/whatsapp/media/5f180090-bf82-4869-9114-7ba1f7cb6e55/preview.jpg?expires=1778091256&signature=47177ec4"
                                            ]
                                        },
                                        "type": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "examples": [
                                                "image"
                                            ]
                                        },
                                        "message_type": {
                                            "type": "integer",
                                            "enum": [
                                                5,
                                                6,
                                                9,
                                                7,
                                                0
                                            ],
                                            "examples": [
                                                5
                                            ]
                                        },
                                        "size": {
                                            "type": "string",
                                            "examples": [
                                                "102400"
                                            ]
                                        },
                                        "moderation_status": {
                                            "type": "string",
                                            "examples": [
                                                "pending"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "media_id",
                                        "url",
                                        "type",
                                        "message_type",
                                        "size",
                                        "moderation_status"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/integrations/whatsapp/templates": {
            "get": {
                "operationId": "integrations.whatsapp.templates.index",
                "summary": "List WhatsApp templates",
                "tags": [
                    "Conversations / WhatsApp"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Rows per page (max 100)",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 15
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Status code: 0 Submitted, 1 Approved, 2 Error, 3 Rejected, 4 Disabled, 5 Paused, 6 Not Submitted, 7 Pending Moderation, 8 Pending Submit, 9 Media Rejected, 10 Deleted in Twilio",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "description": "Category: 1 Authentication, 2 Marketing, 3 Utility",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 2
                    },
                    {
                        "name": "language",
                        "in": "query",
                        "description": "Language code",
                        "schema": {
                            "type": "string"
                        },
                        "example": "en"
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Substring of the template name or body text",
                        "schema": {
                            "type": "string"
                        },
                        "example": "welcome"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WhatsappTemplateResource"
                                            }
                                        },
                                        "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": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "integrations.whatsapp.templates.store",
                "summary": "Create WhatsApp template",
                "tags": [
                    "Conversations / WhatsApp"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreWhatsappTemplateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WhatsappTemplateResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/integrations/whatsapp/templates/{smsTemplate}": {
            "get": {
                "operationId": "integrations.whatsapp.templates.show",
                "summary": "Show WhatsApp template",
                "tags": [
                    "Conversations / WhatsApp"
                ],
                "parameters": [
                    {
                        "name": "smsTemplate",
                        "in": "path",
                        "required": true,
                        "description": "Template ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 123
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WhatsappTemplateResource"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Unauthorized access to template"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "An error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Not a WhatsApp template"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "integrations.whatsapp.templates.update",
                "summary": "Update WhatsApp template",
                "tags": [
                    "Conversations / WhatsApp"
                ],
                "parameters": [
                    {
                        "name": "smsTemplate",
                        "in": "path",
                        "required": true,
                        "description": "Template ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 123
                    }
                ],
                "requestBody": {
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateWhatsappTemplateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WhatsappTemplateResource"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "integrations.whatsapp.templates.destroy",
                "summary": "Delete WhatsApp template",
                "tags": [
                    "Conversations / WhatsApp"
                ],
                "parameters": [
                    {
                        "name": "smsTemplate",
                        "in": "path",
                        "required": true,
                        "description": "Template ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 123
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Template deleted successfully",
                                            "examples": [
                                                "Template deleted successfully"
                                            ]
                                        },
                                        "template_id": {
                                            "type": "integer",
                                            "examples": [
                                                123
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "template_id"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Unauthorized access to template"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "An error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Not a WhatsApp template"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/integrations/whatsapp/templates/{smsTemplate}/submit": {
            "post": {
                "operationId": "integrations.whatsapp.templates.submit",
                "summary": "Submit a WhatsApp template for approval",
                "tags": [
                    "Conversations / WhatsApp"
                ],
                "parameters": [
                    {
                        "name": "smsTemplate",
                        "in": "path",
                        "required": true,
                        "description": "Template ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 123
                    }
                ],
                "responses": {
                    "500": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "Failed to submit template for approval"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Template submitted for approval successfully",
                                            "examples": [
                                                "Template submitted for approval successfully"
                                            ]
                                        },
                                        "template_id": {
                                            "type": "integer",
                                            "examples": [
                                                123
                                            ]
                                        },
                                        "template_sid": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "examples": [
                                                "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
                                            ]
                                        },
                                        "status": {
                                            "type": "string",
                                            "const": "submitted",
                                            "examples": [
                                                "submitted"
                                            ]
                                        },
                                        "twilio_response": {
                                            "type": "array",
                                            "description": "Twilio Content API approval-request response",
                                            "examples": [
                                                {
                                                    "status": "received"
                                                }
                                            ],
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "template_id",
                                        "template_sid",
                                        "status",
                                        "twilio_response"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "Twilio integration not configured for this account"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Template is queued for automatic submission once media moderation completes.",
                                            "examples": [
                                                "Template is queued for automatic submission once media moderation completes."
                                            ]
                                        },
                                        "template_id": {
                                            "type": "integer",
                                            "examples": [
                                                123
                                            ]
                                        },
                                        "status": {
                                            "type": "string",
                                            "const": "pending_submit",
                                            "examples": [
                                                "pending_submit"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "template_id",
                                        "status"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/whatsapp/media/{media}/download-url": {
            "get": {
                "operationId": "whatsapp.media.download-url",
                "description": "A fresh signed URL valid for 15 minutes, usable directly in an `<img>`, `<video>` or\n`<audio>` tag; the `content_url` on a message may already have expired. Answers `202`\nwhile the file is still being moderated, `403` when it was rejected or belongs to another\naccount, `404` when it does not exist.",
                "summary": "Get WhatsApp media download URL",
                "tags": [
                    "Conversations / WhatsApp"
                ],
                "parameters": [
                    {
                        "name": "media",
                        "in": "path",
                        "required": true,
                        "description": "Media ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": "5f180090-bf82-4869-9114-7ba1f7cb6e55"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "url": {
                                            "type": "string",
                                            "examples": [
                                                "https://api.api-nuacom.com/v2/whatsapp/media/5f180090-bf82-4869-9114-7ba1f7cb6e55/preview.mp4?expires=1778091256&signature=47177ec4"
                                            ]
                                        },
                                        "expires_at": {
                                            "type": "string",
                                            "examples": [
                                                "2026-05-06T19:14:16+01:00"
                                            ]
                                        },
                                        "media_type": {
                                            "type": "string",
                                            "examples": [
                                                "video"
                                            ]
                                        },
                                        "mime_type": {
                                            "type": "string",
                                            "examples": [
                                                "video/mp4"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "url",
                                        "expires_at",
                                        "media_type",
                                        "mime_type"
                                    ]
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "const": "pending",
                                            "examples": [
                                                "pending"
                                            ]
                                        },
                                        "message": {
                                            "type": "string",
                                            "const": "Media is still being moderated. Please try again in a few moments.",
                                            "examples": [
                                                "Media is still being moderated. Please try again in a few moments."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "status",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/account/messaging-rates": {
            "get": {
                "operationId": "v2.getAccountMessagingRates",
                "summary": "Get messaging rates for a specific country",
                "tags": [
                    "Conversations / Messaging Rates"
                ],
                "parameters": [
                    {
                        "name": "country_code",
                        "in": "query",
                        "required": true,
                        "description": "ISO2 country code",
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 2
                        },
                        "example": "IE"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/MessagingRateResource"
                                            }
                                        },
                                        "channels": {
                                            "type": "object",
                                            "additionalProperties": {}
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "channels"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/account/messaging-rates-countries": {
            "get": {
                "operationId": "v2.getAccountMessagingRatesCountries",
                "summary": "Get available countries for messaging rates",
                "tags": [
                    "Conversations / Messaging Rates"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/SmsGwPrice"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/fax": {
            "get": {
                "operationId": "fax.index",
                "summary": "List fax numbers",
                "tags": [
                    "Fax"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/FaxNumberResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/fax/{numberId}/inbound_emails": {
            "get": {
                "operationId": "fax.listInboundEmails",
                "summary": "List inbound emails for a fax number",
                "tags": [
                    "Fax"
                ],
                "parameters": [
                    {
                        "name": "numberId",
                        "in": "path",
                        "required": true,
                        "description": "Fax number ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "fax.setInboundEmails",
                "summary": "Set inbound emails for a fax number",
                "tags": [
                    "Fax"
                ],
                "parameters": [
                    {
                        "name": "numberId",
                        "in": "path",
                        "required": true,
                        "description": "Fax number ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SetInboundEmailsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "fax.deleteInboundEmails",
                "summary": "Delete inbound emails for a fax number",
                "tags": [
                    "Fax"
                ],
                "parameters": [
                    {
                        "name": "numberId",
                        "in": "path",
                        "required": true,
                        "description": "Fax number ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/fax/{numberId}/outbound_emails": {
            "get": {
                "operationId": "fax.listOutboundEmails",
                "summary": "List outbound emails for a fax number",
                "tags": [
                    "Fax"
                ],
                "parameters": [
                    {
                        "name": "numberId",
                        "in": "path",
                        "required": true,
                        "description": "Fax number ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "fax.setOutboundEmails",
                "summary": "Set outbound emails for a fax number",
                "tags": [
                    "Fax"
                ],
                "parameters": [
                    {
                        "name": "numberId",
                        "in": "path",
                        "required": true,
                        "description": "Fax number ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SetOutboundEmailsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "fax.deleteOutboundEmails",
                "summary": "Delete outbound emails for a fax number",
                "tags": [
                    "Fax"
                ],
                "parameters": [
                    {
                        "name": "numberId",
                        "in": "path",
                        "required": true,
                        "description": "Fax number ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/fax/history": {
            "get": {
                "operationId": "fax.history",
                "summary": "Get fax history",
                "tags": [
                    "Fax"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        },
                        "example": 1
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "description": "Items per page",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        },
                        "example": 15
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search term",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "example": 353851234567
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "description": "Direction filter (0 = sent, the Outbox; 1 = received, the Inbox)",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "enum": [
                                "0",
                                "1",
                                null
                            ]
                        },
                        "example": 0
                    },
                    {
                        "name": "sortBy",
                        "in": "query",
                        "description": "Sort field",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "direction",
                                "email",
                                "sender",
                                "destination",
                                "send_timestamp",
                                "status",
                                "status_timestamp",
                                null
                            ]
                        },
                        "example": "send_timestamp"
                    },
                    {
                        "name": "sortDir",
                        "in": "query",
                        "description": "Sort direction",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "asc",
                                "desc",
                                null
                            ]
                        },
                        "example": "desc"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/FaxCdrResource"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "fax.deleteFromHistory",
                "summary": "Delete fax records from history",
                "tags": [
                    "Fax"
                ],
                "parameters": [
                    {
                        "name": "ids[]",
                        "in": "query",
                        "description": "Fax record IDs to delete",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/fax/queue": {
            "get": {
                "operationId": "fax.queue",
                "summary": "Get fax queue",
                "tags": [
                    "Fax"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        },
                        "example": 1
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "description": "Items per page",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        },
                        "example": 15
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search term",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "example": 353851234567
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "description": "Direction filter (0 = sent, the Outbox; 1 = received, the Inbox)",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "enum": [
                                "0",
                                "1",
                                null
                            ]
                        },
                        "example": 0
                    },
                    {
                        "name": "sortBy",
                        "in": "query",
                        "description": "Sort field",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "direction",
                                "email",
                                "sender",
                                "destination",
                                "timestamp",
                                null
                            ]
                        },
                        "example": "timestamp"
                    },
                    {
                        "name": "sortDir",
                        "in": "query",
                        "description": "Sort direction",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "asc",
                                "desc",
                                null
                            ]
                        },
                        "example": "desc"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/FaxQueueResource"
                                            }
                                        },
                                        "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"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/fax/{numberId}/send_fax": {
            "post": {
                "operationId": "fax.sendFax",
                "summary": "Send a fax",
                "tags": [
                    "Fax"
                ],
                "parameters": [
                    {
                        "name": "numberId",
                        "in": "path",
                        "required": true,
                        "description": "Fax number ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/SendFaxRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/fax/{faxRecord}/file": {
            "get": {
                "operationId": "fax.file",
                "summary": "Download a fax file",
                "tags": [
                    "Fax"
                ],
                "parameters": [
                    {
                        "name": "faxRecord",
                        "in": "path",
                        "required": true,
                        "description": "Fax CDR ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                ""
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/fax/can_send_fax": {
            "get": {
                "operationId": "fax.canSendFax",
                "summary": "List fax numbers that can send fax",
                "tags": [
                    "Fax"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/FaxNumberResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/voicemail/mailbox_numbers": {
            "get": {
                "operationId": "voicemail.mailboxNumbers",
                "summary": "List mailbox numbers",
                "tags": [
                    "Mailbox"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {}
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/phonebook/name-by-number": {
            "get": {
                "operationId": "v2.sharedContactNameByNumber",
                "summary": "Get shared contact name by phone number",
                "tags": [
                    "Contacts"
                ],
                "parameters": [
                    {
                        "name": "number",
                        "in": "query",
                        "required": true,
                        "description": "Phone number to look up",
                        "schema": {
                            "type": "string"
                        },
                        "example": "+353578601855"
                    },
                    {
                        "name": "normalized_number",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "name": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "name"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/contacts": {
            "get": {
                "operationId": "contacts.contacts.index",
                "description": "Same filters, sorts and response as GET /v3/contacts; the fixed `perPage` choices are the\nonly difference between the two.",
                "summary": "Get Contacts List (perPage 15, 50, 100 or -1)",
                "tags": [
                    "Contacts"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": true,
                        "description": "Page Number",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "example": 2
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "required": true,
                        "description": "Rows per page (15, 50, 100, or -1 for all when the list has at most 1000 contacts)",
                        "schema": {
                            "type": "integer",
                            "enum": [
                                "15",
                                "50",
                                "100",
                                "-1"
                            ]
                        },
                        "example": 15
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sorting fields: id, first_name, last_name, email, comments, contactAddress.country, organization. Add '-' before field to sort descending",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-first_name,last_name"
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "description": "Comma-separated relationships to include. Supported: groups, contactAddress, organizations, contactPhonebook, contactPhones",
                        "schema": {
                            "type": "string"
                        },
                        "example": "groups,contactPhones"
                    },
                    {
                        "name": "filter[contact_ids][]",
                        "in": "query",
                        "description": "Filters. Supported: contact_ids, search, group, organization, visibility, first_name, last_name, number_1, number_2, phone, email, birthdate, comments, country, post_code, address_1, address_2, address_3, address_4, trashed",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        }
                    },
                    {
                        "name": "fields[groups]",
                        "in": "query",
                        "description": "Comma-separated sparse fieldset for the groups relation. Allowed: group_name, group_id",
                        "schema": {
                            "type": "string"
                        },
                        "example": "group_id,group_name"
                    },
                    {
                        "name": "filter[contact_ids][]",
                        "in": "query",
                        "description": "Filter by one or more contact IDs",
                        "schema": {
                            "type": "array",
                            "items": {}
                        },
                        "example": [
                            1,
                            2,
                            3
                        ]
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Search across first/last name, phone number, email and linked organisation name",
                        "schema": {
                            "type": "string"
                        },
                        "example": "John"
                    },
                    {
                        "name": "filter[group]",
                        "in": "query",
                        "description": "Filter by one or more group IDs (comma-separated)",
                        "schema": {
                            "type": "string"
                        },
                        "example": "5,7"
                    },
                    {
                        "name": "filter[organization]",
                        "in": "query",
                        "description": "Filter by one or more organization IDs (comma-separated)",
                        "schema": {
                            "type": "string"
                        },
                        "example": "10,12"
                    },
                    {
                        "name": "filter[visibility]",
                        "in": "query",
                        "description": "Contact visibility: \"all\" (default) returns shared and own private contacts, \"public\" only shared, \"private\" only the current user's private contacts",
                        "schema": {
                            "type": "string"
                        },
                        "example": "public"
                    },
                    {
                        "name": "filter[first_name]",
                        "in": "query",
                        "description": "Filter by first name. Comma-separated terms (OR); prefix a term with ~ for partial match, otherwise exact match",
                        "schema": {
                            "type": "string"
                        },
                        "example": "~john"
                    },
                    {
                        "name": "filter[last_name]",
                        "in": "query",
                        "description": "Filter by last name. Comma-separated terms (OR); prefix a term with ~ for partial match, otherwise exact match",
                        "schema": {
                            "type": "string"
                        },
                        "example": "~doe"
                    },
                    {
                        "name": "filter[number_1]",
                        "in": "query",
                        "description": "Match by mobile phone number: a full number in any notation matches exactly, a partial number as a digit substring",
                        "schema": {
                            "type": "string"
                        },
                        "example": "123123"
                    },
                    {
                        "name": "filter[number_2]",
                        "in": "query",
                        "description": "Match by landline phone number: a full number in any notation matches exactly, a partial number as a digit substring",
                        "schema": {
                            "type": "string"
                        },
                        "example": "014567"
                    },
                    {
                        "name": "filter[phone]",
                        "in": "query",
                        "description": "Match by any phone number: a full number in any local/international notation matches exactly, a partial number as a digit substring",
                        "schema": {
                            "type": "string"
                        },
                        "example": "+353861234567"
                    },
                    {
                        "name": "filter[email]",
                        "in": "query",
                        "description": "Partial match by email address",
                        "schema": {
                            "type": "string"
                        },
                        "example": "john@"
                    },
                    {
                        "name": "filter[birthdate]",
                        "in": "query",
                        "description": "Partial match by date of birth (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        },
                        "example": "2020-01-01"
                    },
                    {
                        "name": "filter[comments]",
                        "in": "query",
                        "description": "Partial match by contact comments",
                        "schema": {
                            "type": "string"
                        },
                        "example": "VIP"
                    },
                    {
                        "name": "filter[country]",
                        "in": "query",
                        "description": "Partial match by country",
                        "schema": {
                            "type": "string"
                        },
                        "example": "IE"
                    },
                    {
                        "name": "filter[post_code]",
                        "in": "query",
                        "description": "Partial match by post code",
                        "schema": {
                            "type": "string"
                        },
                        "example": "D01"
                    },
                    {
                        "name": "filter[address_1]",
                        "in": "query",
                        "description": "Partial match by address line 1",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Main St"
                    },
                    {
                        "name": "filter[address_2]",
                        "in": "query",
                        "description": "Partial match by address line 2",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Apt 4"
                    },
                    {
                        "name": "filter[address_3]",
                        "in": "query",
                        "description": "Partial match by address line 3",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Dublin"
                    },
                    {
                        "name": "filter[address_4]",
                        "in": "query",
                        "description": "Partial match by address line 4",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Leinster"
                    },
                    {
                        "name": "filter[trashed]",
                        "in": "query",
                        "description": "Include soft-deleted contacts. \"with\" includes them, \"only\" returns only deleted",
                        "schema": {
                            "type": "string"
                        },
                        "example": "with"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ContactResource"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "post": {
                "operationId": "contacts.contacts.store",
                "description": "Same request, response and validation rules as POST /v3/contacts. Either path works.",
                "summary": "Create Contact (duplicate of /v3/contacts)",
                "tags": [
                    "Contacts"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ContactRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ContactResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/v2/contacts/{contactId}": {
            "get": {
                "operationId": "contacts.contacts.show",
                "description": "Same request, response and visibility rules as GET /v3/contacts/{contactId}.",
                "summary": "Show Contact Info (duplicate of /v3/contacts/{contactId})",
                "tags": [
                    "Contacts"
                ],
                "parameters": [
                    {
                        "name": "contactId",
                        "in": "path",
                        "required": true,
                        "description": "Contact ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "description": "Comma-separated relationships to include. Allowed: groups, organizations, contactAddress",
                        "schema": {
                            "type": "string"
                        },
                        "example": "groups,contactAddress"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ContactResource"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "contacts.contacts.update",
                "description": "Same request, response and validation rules as PUT /v3/contacts/{contactId}; a full\nreplacement on both paths.",
                "summary": "Update Contact (duplicate of /v3/contacts/{contactId})",
                "tags": [
                    "Contacts"
                ],
                "parameters": [
                    {
                        "name": "contactId",
                        "in": "path",
                        "required": true,
                        "description": "Contact ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ContactRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ContactResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "contacts.contacts.destroy",
                "description": "Same soft delete as DELETE /v3/contacts/{contactId}.",
                "summary": "Delete Contact (duplicate of /v3/contacts/{contactId})",
                "tags": [
                    "Contacts"
                ],
                "parameters": [
                    {
                        "name": "contactId",
                        "in": "path",
                        "required": true,
                        "description": "Contact ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    }
                }
            }
        },
        "/v3/contacts/bulk/visibility": {
            "post": {
                "operationId": "v3.bulkChangeContactVisibility",
                "description": "Updates the `owner_id` field in contact_phonebooks",
                "summary": "Bulk change contact visibility",
                "tags": [
                    "Contacts"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BulkChangeVisibilityRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/contacts/{contactId}/groups": {
            "put": {
                "operationId": "v3.syncContactGroups",
                "summary": "Sync Contact Groups",
                "tags": [
                    "Contacts"
                ],
                "parameters": [
                    {
                        "name": "contactId",
                        "in": "path",
                        "required": true,
                        "description": "Contact ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SyncContactGroupsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "result": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "result"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/contacts": {
            "delete": {
                "operationId": "v3.bulkDeleteContacts",
                "summary": "Bulk Delete Contact",
                "tags": [
                    "Contacts"
                ],
                "parameters": [
                    {
                        "name": "contacts[]",
                        "in": "query",
                        "required": true,
                        "description": "IDs of contacts to delete",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            },
                            "minItems": 1
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "v3.contacts.contacts.index",
                "description": "The list the NUACOM portal uses. GET /v2/contacts returns the same rows for the same\nfilters and sorts; it only restricts `perPage` to 15, 50, 100 or -1.",
                "summary": "Get Contacts List (perPage 1-500)",
                "tags": [
                    "Contacts"
                ],
                "parameters": [
                    {
                        "name": "filter[contact_ids][]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        }
                    },
                    {
                        "name": "filter[group][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[organization][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[search][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[first_name][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 256
                            }
                        }
                    },
                    {
                        "name": "filter[last_name][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 256
                            }
                        }
                    },
                    {
                        "name": "filter[number_1][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[number_2][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[phone][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[email][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[birthdate][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[comments][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[country][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[post_code][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[address_1][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[address_2][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[address_3][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[address_4][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": true,
                        "description": "Page number",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "required": true,
                        "description": "Rows per page (1-500)",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 15
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sort field. Allowed: id, first_name, last_name, email, comments, contactAddress.country, organization. Prefix with - for descending. Default: first_name",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-first_name"
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "description": "Comma-separated relationships to include. Allowed: groups, contactAddress, organizations, contactPhonebook, contactPhones",
                        "schema": {
                            "type": "string"
                        },
                        "example": "groups,contactPhones"
                    },
                    {
                        "name": "fields[groups]",
                        "in": "query",
                        "description": "Comma-separated sparse fieldset for the groups relation. Allowed: group_name, group_id",
                        "schema": {
                            "type": "string"
                        },
                        "example": "group_id,group_name"
                    },
                    {
                        "name": "filter[contact_ids][]",
                        "in": "query",
                        "description": "Filter by one or more contact IDs",
                        "schema": {
                            "type": "array",
                            "items": {}
                        },
                        "example": [
                            1,
                            2,
                            3
                        ]
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Search across first/last name, phone number, email and linked organisation name",
                        "schema": {
                            "type": "string"
                        },
                        "example": "John"
                    },
                    {
                        "name": "filter[group]",
                        "in": "query",
                        "description": "Filter by one or more group IDs (comma-separated)",
                        "schema": {
                            "type": "string"
                        },
                        "example": "5,7"
                    },
                    {
                        "name": "filter[organization]",
                        "in": "query",
                        "description": "Filter by one or more organization IDs (comma-separated)",
                        "schema": {
                            "type": "string"
                        },
                        "example": "10,12"
                    },
                    {
                        "name": "filter[visibility]",
                        "in": "query",
                        "description": "Contact visibility: \"all\" (default) returns shared and own private contacts, \"public\" only shared, \"private\" only the current user's private contacts",
                        "schema": {
                            "type": "string"
                        },
                        "example": "public"
                    },
                    {
                        "name": "filter[first_name]",
                        "in": "query",
                        "description": "Filter by first name. Comma-separated terms (OR); prefix a term with ~ for partial match, otherwise exact match",
                        "schema": {
                            "type": "string"
                        },
                        "example": "~john"
                    },
                    {
                        "name": "filter[last_name]",
                        "in": "query",
                        "description": "Filter by last name. Comma-separated terms (OR); prefix a term with ~ for partial match, otherwise exact match",
                        "schema": {
                            "type": "string"
                        },
                        "example": "~doe"
                    },
                    {
                        "name": "filter[number_1]",
                        "in": "query",
                        "description": "Match by mobile phone number: a full number in any notation matches exactly, a partial number as a digit substring",
                        "schema": {
                            "type": "string"
                        },
                        "example": "123123"
                    },
                    {
                        "name": "filter[number_2]",
                        "in": "query",
                        "description": "Match by landline phone number: a full number in any notation matches exactly, a partial number as a digit substring",
                        "schema": {
                            "type": "string"
                        },
                        "example": "014567"
                    },
                    {
                        "name": "filter[phone]",
                        "in": "query",
                        "description": "Match by any phone number: a full number in any local/international notation matches exactly, a partial number as a digit substring",
                        "schema": {
                            "type": "string"
                        },
                        "example": "+353861234567"
                    },
                    {
                        "name": "filter[email]",
                        "in": "query",
                        "description": "Partial match by email address",
                        "schema": {
                            "type": "string"
                        },
                        "example": "john@"
                    },
                    {
                        "name": "filter[birthdate]",
                        "in": "query",
                        "description": "Partial match by date of birth (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        },
                        "example": "2020-01-01"
                    },
                    {
                        "name": "filter[comments]",
                        "in": "query",
                        "description": "Partial match by contact comments",
                        "schema": {
                            "type": "string"
                        },
                        "example": "VIP"
                    },
                    {
                        "name": "filter[country]",
                        "in": "query",
                        "description": "Partial match by country",
                        "schema": {
                            "type": "string"
                        },
                        "example": "IE"
                    },
                    {
                        "name": "filter[post_code]",
                        "in": "query",
                        "description": "Partial match by post code",
                        "schema": {
                            "type": "string"
                        },
                        "example": "D01"
                    },
                    {
                        "name": "filter[address_1]",
                        "in": "query",
                        "description": "Partial match by address line 1",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Main St"
                    },
                    {
                        "name": "filter[address_2]",
                        "in": "query",
                        "description": "Partial match by address line 2",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Apt 4"
                    },
                    {
                        "name": "filter[address_3]",
                        "in": "query",
                        "description": "Partial match by address line 3",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Dublin"
                    },
                    {
                        "name": "filter[address_4]",
                        "in": "query",
                        "description": "Partial match by address line 4",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Leinster"
                    },
                    {
                        "name": "filter[trashed]",
                        "in": "query",
                        "description": "Include soft-deleted contacts. \"with\" includes them, \"only\" returns only deleted",
                        "schema": {
                            "type": "string"
                        },
                        "example": "with"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactResource"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v3.contacts.contacts.store",
                "summary": "Create Contact",
                "tags": [
                    "Contacts"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/App.Http.Requests.Api.V3.ContactRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/contacts/export": {
            "get": {
                "operationId": "v3.exportContacts",
                "description": "Honours the contacts-list filters + sort. On accounts whose phonebook runs in library mode (set by\nNUACOM) the CSV is generated asynchronously and emailed to the logged-in user (returns 204).\nOtherwise it generates the CSV synchronously and returns a short-lived `{ path }` download URL.",
                "summary": "Export Contacts List",
                "tags": [
                    "Contacts"
                ],
                "parameters": [
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sort field, mirroring GET /v3/contacts. Add '-' before field to sort descending",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-first_name"
                    },
                    {
                        "name": "filter[contact_ids][]",
                        "in": "query",
                        "description": "Filter by one or more contact IDs",
                        "schema": {
                            "type": "array",
                            "items": {}
                        },
                        "example": [
                            1,
                            2,
                            3
                        ]
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Search across first/last name, phone number, email and linked organisation name",
                        "schema": {
                            "type": "string"
                        },
                        "example": "John"
                    },
                    {
                        "name": "filter[group]",
                        "in": "query",
                        "description": "Filter by one or more group IDs (comma-separated)",
                        "schema": {
                            "type": "string"
                        },
                        "example": "5,7"
                    },
                    {
                        "name": "filter[organization]",
                        "in": "query",
                        "description": "Filter by one or more organization IDs (comma-separated)",
                        "schema": {
                            "type": "string"
                        },
                        "example": "10,12"
                    },
                    {
                        "name": "filter[visibility]",
                        "in": "query",
                        "description": "Contact visibility: \"all\" (default) returns shared and own private contacts, \"public\" only shared, \"private\" only the current user's private contacts",
                        "schema": {
                            "type": "string"
                        },
                        "example": "all"
                    },
                    {
                        "name": "filter[first_name]",
                        "in": "query",
                        "description": "Filter by first name. Comma-separated terms (OR); prefix a term with ~ for partial match, otherwise exact match",
                        "schema": {
                            "type": "string"
                        },
                        "example": "~john"
                    },
                    {
                        "name": "filter[last_name]",
                        "in": "query",
                        "description": "Filter by last name. Comma-separated terms (OR); prefix a term with ~ for partial match, otherwise exact match",
                        "schema": {
                            "type": "string"
                        },
                        "example": "~doe"
                    },
                    {
                        "name": "filter[number_1]",
                        "in": "query",
                        "description": "Match by mobile phone number: a full number in any notation matches exactly, a partial number as a digit substring",
                        "schema": {
                            "type": "string"
                        },
                        "example": "123123"
                    },
                    {
                        "name": "filter[number_2]",
                        "in": "query",
                        "description": "Match by landline phone number: a full number in any notation matches exactly, a partial number as a digit substring",
                        "schema": {
                            "type": "string"
                        },
                        "example": "014567"
                    },
                    {
                        "name": "filter[phone]",
                        "in": "query",
                        "description": "Match by any phone number: a full number in any local/international notation matches exactly, a partial number as a digit substring",
                        "schema": {
                            "type": "string"
                        },
                        "example": "+353861234567"
                    },
                    {
                        "name": "filter[email]",
                        "in": "query",
                        "description": "Partial match by email address",
                        "schema": {
                            "type": "string"
                        },
                        "example": "john@"
                    },
                    {
                        "name": "filter[birthdate]",
                        "in": "query",
                        "description": "Partial match by date of birth (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        },
                        "example": "2020-01-01"
                    },
                    {
                        "name": "filter[comments]",
                        "in": "query",
                        "description": "Partial match by contact comments",
                        "schema": {
                            "type": "string"
                        },
                        "example": "VIP"
                    },
                    {
                        "name": "filter[country]",
                        "in": "query",
                        "description": "Partial match by country",
                        "schema": {
                            "type": "string"
                        },
                        "example": "IE"
                    },
                    {
                        "name": "filter[post_code]",
                        "in": "query",
                        "description": "Partial match by post code",
                        "schema": {
                            "type": "string"
                        },
                        "example": "D01"
                    },
                    {
                        "name": "filter[address_1]",
                        "in": "query",
                        "description": "Partial match by address line 1",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Main St"
                    },
                    {
                        "name": "filter[address_2]",
                        "in": "query",
                        "description": "Partial match by address line 2",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Apt 4"
                    },
                    {
                        "name": "filter[address_3]",
                        "in": "query",
                        "description": "Partial match by address line 3",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Dublin"
                    },
                    {
                        "name": "filter[address_4]",
                        "in": "query",
                        "description": "Partial match by address line 4",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Leinster"
                    },
                    {
                        "name": "filter[trashed]",
                        "in": "query",
                        "description": "Include soft-deleted contacts. \"with\" includes them, \"only\" returns only deleted",
                        "schema": {
                            "type": "string"
                        },
                        "example": "with"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "path": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "path"
                                    ]
                                }
                            }
                        }
                    },
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/contacts/{contactId}": {
            "get": {
                "operationId": "v3.contacts.contacts.show",
                "summary": "Show Contact Info",
                "tags": [
                    "Contacts"
                ],
                "parameters": [
                    {
                        "name": "contactId",
                        "in": "path",
                        "required": true,
                        "description": "Contact ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactResource"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "v3.contacts.contacts.update",
                "summary": "Update Contact",
                "tags": [
                    "Contacts"
                ],
                "parameters": [
                    {
                        "name": "contactId",
                        "in": "path",
                        "required": true,
                        "description": "Contact ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/App.Http.Requests.Api.V3.ContactRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v3.contacts.contacts.destroy",
                "summary": "Delete Contact",
                "tags": [
                    "Contacts"
                ],
                "parameters": [
                    {
                        "name": "contactId",
                        "in": "path",
                        "required": true,
                        "description": "Contact ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 123456
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/integration-contacts/export": {
            "get": {
                "operationId": "v3.exportIntegrationContacts",
                "description": "Generates a CSV of the account's integration contacts honouring the list's filters\nand emails it to the logged-in user. Returns immediately; delivery is async.",
                "summary": "Export Integration Contacts",
                "tags": [
                    "Contacts"
                ],
                "parameters": [
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sorting field: id, first_name, last_name. Add '-' before field to sort descending",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "first_name",
                                "last_name",
                                "-id",
                                "-first_name",
                                "-last_name"
                            ]
                        }
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Partial match across first name, last name, phone number and integration external id",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Acme"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/integration-contacts": {
            "get": {
                "operationId": "v3.getIntegrationContacts",
                "summary": "Get Integration Contacts List",
                "tags": [
                    "Contacts"
                ],
                "parameters": [
                    {
                        "name": "filter[search][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[first_name][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 256
                            }
                        }
                    },
                    {
                        "name": "filter[phone][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": true,
                        "description": "Page number",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "required": true,
                        "description": "Rows per page (1-500)",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 15
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sort field. Allowed: id, first_name, last_name. Prefix with - for descending. Default: first_name",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-first_name"
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "description": "Comma-separated relationships to include. Allowed: contactIntegration, contactPhones",
                        "schema": {
                            "type": "string"
                        },
                        "example": "contactIntegration,contactPhones"
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Search across first/last name, phone number and integration external ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": "John"
                    },
                    {
                        "name": "filter[first_name]",
                        "in": "query",
                        "description": "Filter by first name. Comma-separated terms (OR); prefix a term with ~ for partial match, otherwise exact match",
                        "schema": {
                            "type": "string"
                        },
                        "example": "~john"
                    },
                    {
                        "name": "filter[phone]",
                        "in": "query",
                        "description": "Partial match by phone number",
                        "schema": {
                            "type": "string"
                        },
                        "example": "35386"
                    },
                    {
                        "name": "filter[trashed]",
                        "in": "query",
                        "description": "Include soft-deleted contacts. \"with\" includes them, \"only\" returns only deleted",
                        "schema": {
                            "type": "string"
                        },
                        "example": "with"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/IntegrationContactResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/phonebook/import": {
            "post": {
                "operationId": "import.phonebookImport",
                "description": "Takes one `mobile_index` and one `landline_index`, has no post-code column and imports\nthe first row of the file as a contact. POST /v3/contacts/import takes `phone_indexes[]`\n(up to five numbers) and `post_code_index`, and skips the header row.",
                "summary": "Import phonebook contacts (one mobile and one landline column)",
                "tags": [
                    "Contacts / Import"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/ImportPhonebooksRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "result": {
                                                    "type": "boolean"
                                                },
                                                "isAsync": {
                                                    "type": "boolean"
                                                },
                                                "importId": {
                                                    "type": "string"
                                                },
                                                "importedRows": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0,
                                                    "additionalItems": false
                                                },
                                                "ignoredRows": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0,
                                                    "additionalItems": false
                                                },
                                                "invalidFields": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0,
                                                    "additionalItems": false
                                                },
                                                "totalImportedRows": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "result",
                                                "isAsync",
                                                "importId",
                                                "importedRows",
                                                "ignoredRows",
                                                "invalidFields",
                                                "totalImportedRows"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "result": {
                                                    "type": "boolean"
                                                },
                                                "isAsync": {
                                                    "type": "boolean"
                                                },
                                                "importId": {
                                                    "type": "null"
                                                },
                                                "importedRows": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0,
                                                    "additionalItems": false
                                                },
                                                "ignoredRows": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0,
                                                    "additionalItems": false
                                                },
                                                "invalidFields": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0,
                                                    "additionalItems": false
                                                },
                                                "totalImportedRows": {
                                                    "type": "integer"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Import completed successfully"
                                                }
                                            },
                                            "required": [
                                                "result",
                                                "isAsync",
                                                "importId",
                                                "importedRows",
                                                "ignoredRows",
                                                "invalidFields",
                                                "totalImportedRows",
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/phonebook/import/status/{importId}": {
            "get": {
                "operationId": "import.phonebookImportStatus",
                "description": "The two importers keep their progress separately: an import started by\nPOST /v3/contacts/import is polled at GET /v3/contacts/import/status/{importId} instead.",
                "summary": "Get phonebook import status (for POST /v2/phonebook/import)",
                "tags": [
                    "Contacts / Import"
                ],
                "parameters": [
                    {
                        "name": "importId",
                        "in": "path",
                        "required": true,
                        "description": "Import job ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "Import not found or expired"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/contacts/import": {
            "post": {
                "operationId": "v3.contactsImport",
                "description": "The importer the NUACOM portal uses: `phone_indexes[]` maps up to five numbers per row\nand `post_code_index` is supported. POST /v2/phonebook/import maps one mobile and one\nlandline column, has no post-code column and treats the header row as a contact.",
                "summary": "Import contacts from a file (up to five numbers per row, skips the header)",
                "tags": [
                    "Contacts / Import"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/ImportContactsData"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ContactImportResultResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/contacts/import/status/{importId}": {
            "get": {
                "operationId": "v3.contactsImportStatus",
                "summary": "Get contacts import status (for POST /v3/contacts/import)",
                "tags": [
                    "Contacts / Import"
                ],
                "parameters": [
                    {
                        "name": "importId",
                        "in": "path",
                        "required": true,
                        "description": "Import job ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ContactImportStatusResource"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Import not found or expired"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/contacts/groups": {
            "get": {
                "operationId": "v3.contacts.groups.index",
                "summary": "Get Contact Groups List",
                "tags": [
                    "Contacts / Groups"
                ],
                "parameters": [
                    {
                        "name": "filter[name][]",
                        "in": "query",
                        "description": "Column filters, keyed by column",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 50
                            }
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": true,
                        "description": "Page number",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 2
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "required": true,
                        "description": "Rows per page (1-500)",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 15
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sort field. Allowed: id, name. Prefix with - for descending. Default: name",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-name"
                    },
                    {
                        "name": "filter[name]",
                        "in": "query",
                        "description": "Partial match filter by group name",
                        "schema": {
                            "type": "string"
                        },
                        "example": "VIP"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactGroupResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v3.contacts.groups.store",
                "summary": "Create Contacts Group",
                "tags": [
                    "Contacts / Groups"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ContactGroupRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactGroupResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/contacts/groups/{groupId}": {
            "get": {
                "operationId": "v3.contacts.groups.show",
                "summary": "Show Contact Group Info",
                "tags": [
                    "Contacts / Groups"
                ],
                "parameters": [
                    {
                        "name": "groupId",
                        "in": "path",
                        "required": true,
                        "description": "Group ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactGroupResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "v3.contacts.groups.update",
                "summary": "Update Contact Group",
                "tags": [
                    "Contacts / Groups"
                ],
                "parameters": [
                    {
                        "name": "groupId",
                        "in": "path",
                        "required": true,
                        "description": "Group ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ContactGroupRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactGroupResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v3.contacts.groups.destroy",
                "description": "Pass delete_contacts=true to soft-delete the group's contacts as well, matching the legacy\nportal's \"Delete including contacts\" checkbox. Only public contacts and the user's own private\nones are deleted; other users' private contacts just lose the group. The group's contact_groups\nrows are removed either way.",
                "summary": "Delete Contact Group",
                "tags": [
                    "Contacts / Groups"
                ],
                "parameters": [
                    {
                        "name": "delete_contacts",
                        "in": "query",
                        "description": "Also soft-delete every contact of the group",
                        "schema": {
                            "type": "boolean"
                        },
                        "example": true
                    },
                    {
                        "name": "groupId",
                        "in": "path",
                        "required": true,
                        "description": "Group ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/groups/contacts/bulk": {
            "post": {
                "operationId": "v3.groups.contacts.bulk",
                "description": "Assigns multiple contacts to multiple groups",
                "summary": "Bulk Add Contacts to Groups",
                "tags": [
                    "Contacts / Groups"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BulkAddContactsToGroupsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/contacts/organizations/export": {
            "get": {
                "operationId": "v3.exportOrganizations",
                "description": "Generates a CSV of the account's organizations honouring the list's filters\nand emails it to the logged-in user. Returns immediately; delivery is async.",
                "summary": "Export Contact Organizations",
                "tags": [
                    "Contacts / Organizations"
                ],
                "parameters": [
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sort field. Allowed: id, name, phone, email, notes, country, city, county. Prefix with - for descending",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-name"
                    },
                    {
                        "name": "filter[name]",
                        "in": "query",
                        "description": "Partial match filter by organization name",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Acme"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/contacts/organizations/bulk": {
            "delete": {
                "operationId": "v3.bulkRemoveContactsFromOrganization",
                "description": "Unlinks multiple contacts from a single organization. Both the contacts and the\norganization remain \u2014 only the association between them is removed.",
                "summary": "Bulk Remove Contacts from Organization",
                "tags": [
                    "Contacts / Organizations"
                ],
                "parameters": [
                    {
                        "name": "contacts[]",
                        "in": "query",
                        "required": true,
                        "description": "IDs of contacts to unlink",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        }
                    },
                    {
                        "name": "organization",
                        "in": "query",
                        "required": true,
                        "description": "ID of the organization",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 10
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v3.bulkAddContactsToOrganization",
                "description": "Assigns multiple contacts to multiple organizations",
                "summary": "Bulk Add Contacts to Organizations",
                "tags": [
                    "Contacts / Organizations"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BulkAddContactsToOrganizationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/contacts/organizations/{organizationId}/logo": {
            "post": {
                "operationId": "organizationLogo.store",
                "description": "Stores the uploaded logo and returns the organization with its public\n`logo_url`. Replaces any existing logo.",
                "summary": "Upload Organization Logo",
                "tags": [
                    "Contacts / Organizations"
                ],
                "parameters": [
                    {
                        "name": "organizationId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "organization",
                        "in": "path",
                        "required": true,
                        "description": "Organization ID",
                        "schema": {},
                        "example": 12345
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/UploadOrganizationLogoRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactOrganizationResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "organizationLogo.destroy",
                "summary": "Delete Organization Logo",
                "tags": [
                    "Contacts / Organizations"
                ],
                "parameters": [
                    {
                        "name": "organizationId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "organization",
                        "in": "path",
                        "required": true,
                        "description": "Organization ID",
                        "schema": {},
                        "example": 12345
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactOrganizationResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/contacts/organizations": {
            "get": {
                "operationId": "v3.contacts.organizations.index",
                "summary": "Get Contact Organizations List",
                "tags": [
                    "Contacts / Organizations"
                ],
                "parameters": [
                    {
                        "name": "filter[name][]",
                        "in": "query",
                        "schema": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 100
                            }
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": true,
                        "description": "Page number",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "required": true,
                        "description": "Rows per page (1-500)",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 15
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sort field. Allowed: id, name, phone, email, notes, country, county, city. Prefix with - for descending. Default: name",
                        "schema": {
                            "type": "string"
                        },
                        "example": "-name"
                    },
                    {
                        "name": "filter[name]",
                        "in": "query",
                        "description": "Partial match filter by organization name",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Acme"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactOrganizationResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v3.contacts.organizations.store",
                "summary": "Create Contacts Organization",
                "tags": [
                    "Contacts / Organizations"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ContactOrganizationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactOrganizationResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v3.bulkDeleteOrganizations",
                "summary": "Bulk Delete Organizations",
                "tags": [
                    "Contacts / Organizations"
                ],
                "parameters": [
                    {
                        "name": "organizations[]",
                        "in": "query",
                        "required": true,
                        "description": "IDs of organizations to delete",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            },
                            "minItems": 1
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/contacts/organizations/{organizationId}": {
            "get": {
                "operationId": "v3.contacts.organizations.show",
                "summary": "Show Contact Organization Info",
                "tags": [
                    "Contacts / Organizations"
                ],
                "parameters": [
                    {
                        "name": "organizationId",
                        "in": "path",
                        "required": true,
                        "description": "Organization ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactOrganizationResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "v3.contacts.organizations.update",
                "summary": "Update Contact Organization",
                "tags": [
                    "Contacts / Organizations"
                ],
                "parameters": [
                    {
                        "name": "organizationId",
                        "in": "path",
                        "required": true,
                        "description": "Organization ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ContactOrganizationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactOrganizationResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v3.contacts.organizations.destroy",
                "summary": "Delete Contact Organization",
                "tags": [
                    "Contacts / Organizations"
                ],
                "parameters": [
                    {
                        "name": "organizationId",
                        "in": "path",
                        "required": true,
                        "description": "Organization ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/contacts/activity": {
            "get": {
                "operationId": "v3.contactsActivity",
                "summary": "Get Contact Activity",
                "tags": [
                    "Contacts / Activity"
                ],
                "parameters": [
                    {
                        "name": "contactId",
                        "in": "query",
                        "required": true,
                        "description": "Contact ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12345
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": true,
                        "description": "Page number",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "required": true,
                        "description": "Rows per page (1-500)",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 15
                    },
                    {
                        "name": "timeFrom",
                        "in": "query",
                        "description": "Start time filter",
                        "schema": {
                            "type": "string"
                        },
                        "example": "2024-01-01 00:00:00"
                    },
                    {
                        "name": "timeTo",
                        "in": "query",
                        "description": "End time filter",
                        "schema": {
                            "type": "string"
                        },
                        "example": "2024-12-31 23:59:59"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "calls": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/CallActivityResource"
                                            }
                                        },
                                        "sms": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/SmsActivityResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "calls",
                                        "sms"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/webhook-subscriptions": {
            "get": {
                "operationId": "webhook-subscriptions.webhook-subscriptions.index",
                "summary": "List Webhook Subscriptions",
                "tags": [
                    "Webhooks"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WebhookSubscriptionResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "webhook-subscriptions.webhook-subscriptions.store",
                "description": "One URL may be registered for several event types; each is its own\nsubscription. Responds 201 with the new subscription's id, or 200 with the\nexisting id when an active subscription for the same URL and event type is\nalready registered.",
                "summary": "Register Webhook Subscription",
                "tags": [
                    "Webhooks"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreWebhookSubscriptionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "id"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/webhook-subscriptions/{webhookSubscription}": {
            "delete": {
                "operationId": "webhook-subscriptions.webhook-subscriptions.destroy",
                "summary": "Delete Webhook Subscription",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhookSubscription",
                        "in": "path",
                        "required": true,
                        "description": "Webhook Subscription ID",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 123
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Not Found."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/top-up/balance": {
            "post": {
                "operationId": "topUp.balanceTopUp",
                "summary": "Top up balance",
                "tags": [
                    "Top Up"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TopUpBalanceRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/top-up/balance/calculate": {
            "post": {
                "operationId": "topUp.calculateBalanceTopUp",
                "summary": "Calculate balance top up price",
                "tags": [
                    "Top Up"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CalculateBalanceTopUpRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TopUpCalculationResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/top-up/auto/balance": {
            "get": {
                "operationId": "topUp.getBalanceAutoTopUp",
                "summary": "Get balance auto top up configuration",
                "tags": [
                    "Top Up"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BalanceAutoTopUpResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "topUp.saveBalanceAutoTopUp",
                "summary": "Save balance auto top up configuration",
                "tags": [
                    "Top Up"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SaveBalanceAutoTopUpRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "topUp.deleteBalanceAutoTopUp",
                "summary": "Delete balance auto top up configuration",
                "tags": [
                    "Top Up"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/top-up/call": {
            "post": {
                "operationId": "topUp.callTopUp",
                "summary": "Top up call credits",
                "tags": [
                    "Top Up"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TopUpBalanceRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/top-up/call/calculate": {
            "post": {
                "operationId": "topUp.calculateCallTopUp",
                "summary": "Calculate call credit top up price",
                "tags": [
                    "Top Up"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CalculateBalanceTopUpRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TopUpCalculationResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/top-up/auto/call": {
            "get": {
                "operationId": "topUp.getCallAutoTopUp",
                "summary": "Get call auto top up configuration",
                "tags": [
                    "Top Up"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CallAutoTopUpResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "topUp.saveCallAutoTopUp",
                "summary": "Save call auto top up configuration",
                "tags": [
                    "Top Up"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SaveCallAutoTopUpRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "topUp.deleteCallAutoTopUp",
                "summary": "Delete call auto top up configuration",
                "tags": [
                    "Top Up"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/top-up/sms": {
            "post": {
                "operationId": "topUp.smsTopUp",
                "summary": "Top up SMS credits",
                "tags": [
                    "Top Up"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TopUpSmsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/top-up/sms/calculate": {
            "post": {
                "operationId": "topUp.calculateSmsTopUp",
                "summary": "Calculate SMS top up price",
                "tags": [
                    "Top Up"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CalculateSmsTopUpRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TopUpCalculationResource"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/top-up/auto/sms": {
            "get": {
                "operationId": "topUp.getSmsAutoTopUp",
                "summary": "Get SMS auto top up configuration",
                "tags": [
                    "Top Up"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SmsAutoTopUpResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "topUp.saveSmsAutoTopUp",
                "summary": "Save SMS auto top up configuration",
                "tags": [
                    "Top Up"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SaveSmsAutoTopUpRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "topUp.deleteSmsAutoTopUp",
                "summary": "Delete SMS auto top up configuration",
                "tags": [
                    "Top Up"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/addons": {
            "get": {
                "operationId": "addon",
                "summary": "List addons",
                "tags": [
                    "Addons"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/AddonItemResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/vat-rate": {
            "get": {
                "operationId": "vatRate.index",
                "summary": "List VAT rates",
                "tags": [
                    "Payments"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/payments": {
            "get": {
                "operationId": "payments.index",
                "summary": "List payment methods",
                "tags": [
                    "Payments"
                ],
                "responses": {
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/PaymentMethodResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/payments/set-method-as-default": {
            "post": {
                "operationId": "payments.makeMethodDefault",
                "summary": "Set a payment method as default",
                "tags": [
                    "Payments"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SetPaymentMethodAsDefaultRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "boolean"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/payments/delete-method": {
            "delete": {
                "operationId": "payments.deleteMethod",
                "summary": "Delete a payment method",
                "tags": [
                    "Payments"
                ],
                "parameters": [
                    {
                        "name": "payment_method",
                        "in": "query",
                        "required": true,
                        "description": "Stripe payment method ID",
                        "schema": {
                            "type": "string"
                        },
                        "example": "pm_1234567890"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "boolean"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/payments/check-default-payment": {
            "get": {
                "operationId": "payments.checkDefaultPayment",
                "summary": "Check default payment method",
                "tags": [
                    "Payments"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "boolean"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/payments/default-payment": {
            "get": {
                "operationId": "payments.defaultPayment",
                "summary": "Process default payment",
                "tags": [
                    "Payments"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "processor": {
                                            "type": "integer",
                                            "const": 1
                                        },
                                        "id": {
                                            "type": "string"
                                        },
                                        "brand": {
                                            "type": "string"
                                        },
                                        "last_four": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "processor",
                                        "id",
                                        "brand",
                                        "last_four"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/payments/pay-outstanding-amount": {
            "post": {
                "operationId": "payments.payOutstandingAmount",
                "summary": "Pay the outstanding amount",
                "tags": [
                    "Payments"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PayOutstandingAmountRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "boolean"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/subscriptions": {
            "get": {
                "operationId": "subscriptions.index",
                "summary": "List subscriptions",
                "tags": [
                    "Subscriptions"
                ],
                "responses": {
                    "500": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "type": "null"
                                        }
                                    },
                                    "required": [
                                        "error",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/SubscriptionResource"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/data-retention/change-addon": {
            "post": {
                "operationId": "data-retention.change-addon",
                "summary": "Change data retention addon",
                "tags": [
                    "Data Retention"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ChangeAddonRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/data-retention/settings/activate-now": {
            "patch": {
                "operationId": "data-retention.activate-now",
                "summary": "Activate data retention settings immediately",
                "tags": [
                    "Data Retention"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/data-retention/settings/cancel": {
            "patch": {
                "operationId": "data-retention.cancel",
                "summary": "Cancel pending data retention settings",
                "tags": [
                    "Data Retention"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/data-retention/settings": {
            "get": {
                "operationId": "data-retention.settings.index",
                "summary": "Show data retention settings",
                "tags": [
                    "Data Retention"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "call_logs": {
                                            "type": "object",
                                            "properties": {
                                                "pending": {
                                                    "type": "null"
                                                },
                                                "current": {
                                                    "type": "null"
                                                },
                                                "limit": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "pending",
                                                "current",
                                                "limit"
                                            ]
                                        },
                                        "sms_history": {
                                            "type": "object",
                                            "properties": {
                                                "pending": {
                                                    "type": "null"
                                                },
                                                "current": {
                                                    "type": "null"
                                                },
                                                "limit": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "pending",
                                                "current",
                                                "limit"
                                            ]
                                        },
                                        "call_recording": {
                                            "type": "object",
                                            "properties": {
                                                "pending": {
                                                    "type": "null"
                                                },
                                                "current": {
                                                    "type": "null"
                                                },
                                                "limit": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "pending",
                                                "current",
                                                "limit"
                                            ]
                                        },
                                        "fax_data": {
                                            "type": "object",
                                            "properties": {
                                                "pending": {
                                                    "type": "null"
                                                },
                                                "current": {
                                                    "type": "null"
                                                },
                                                "limit": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "pending",
                                                "current",
                                                "limit"
                                            ]
                                        },
                                        "voicemail": {
                                            "type": "object",
                                            "properties": {
                                                "pending": {
                                                    "type": "null"
                                                },
                                                "current": {
                                                    "type": "null"
                                                },
                                                "limit": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "pending",
                                                "current",
                                                "limit"
                                            ]
                                        },
                                        "mailboxes": {
                                            "type": "string"
                                        },
                                        "extensions_count": {
                                            "type": "integer",
                                            "minimum": 0
                                        },
                                        "is_blocked": {
                                            "type": "boolean"
                                        },
                                        "early_retention_alert": {
                                            "type": "boolean"
                                        },
                                        "updated_at": {
                                            "description": "When the retention settings last changed",
                                            "examples": [
                                                "2024-08-28T09:15:00+01:00"
                                            ],
                                            "anyOf": [
                                                {
                                                    "type": "string",
                                                    "format": "date-time"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "call_logs",
                                        "sms_history",
                                        "call_recording",
                                        "fax_data",
                                        "voicemail",
                                        "mailboxes",
                                        "extensions_count",
                                        "is_blocked",
                                        "early_retention_alert",
                                        "updated_at"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "data-retention.settings.store",
                "summary": "Update data retention settings",
                "tags": [
                    "Data Retention"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SettingsStoreRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/time-zones": {
            "get": {
                "operationId": "v3.getTimezones",
                "summary": "Get Time Zones",
                "tags": [
                    "I18n"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "examples": [
                                        [
                                            "Europe/Dublin",
                                            "Europe/London",
                                            "America/New_York"
                                        ]
                                    ],
                                    "items": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v3/country-list": {
            "get": {
                "operationId": "v3.getCountries",
                "summary": "Get Countries",
                "tags": [
                    "I18n"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "examples": [
                                        [
                                            {
                                                "name": "Ireland",
                                                "dialCode": 353,
                                                "iso2": "IE"
                                            },
                                            {
                                                "name": "Isle of Man",
                                                "dialCode": 44,
                                                "iso2": "IM"
                                            }
                                        ]
                                    ],
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "name": {
                                                "type": "string"
                                            },
                                            "dialCode": {
                                                "type": "integer"
                                            },
                                            "iso2": {
                                                "type": "string"
                                            }
                                        },
                                        "required": [
                                            "name",
                                            "dialCode",
                                            "iso2"
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/client-operations": {
            "get": {
                "operationId": "clientOperations.index",
                "summary": "List client operations",
                "tags": [
                    "Client Operations"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/client-operations/{id}": {
            "delete": {
                "operationId": "clientOperations.delete",
                "summary": "Delete a scheduled client operation",
                "tags": [
                    "Client Operations"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Client operation ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "Only scheduled processes can be deleted"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/client-operations/export/{phone}": {
            "post": {
                "operationId": "clientOperations.export",
                "summary": "Export client data to email",
                "tags": [
                    "Client Operations"
                ],
                "parameters": [
                    {
                        "name": "phone",
                        "in": "path",
                        "required": true,
                        "description": "Client phone number",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "payload": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v2/client-operations/process/{phone}": {
            "post": {
                "operationId": "clientOperations.process",
                "summary": "Schedule a client data operation",
                "tags": [
                    "Client Operations"
                ],
                "parameters": [
                    {
                        "name": "phone",
                        "in": "path",
                        "required": true,
                        "description": "Client phone number",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "process": {
                                        "type": "string",
                                        "enum": [
                                            "delete",
                                            "anonymize"
                                        ]
                                    },
                                    "payload": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "minItems": 1
                                    }
                                },
                                "required": [
                                    "process",
                                    "payload"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "examples": [
                                                "Unauthenticated."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "AccountAiConfigResource": {
                "type": "object",
                "properties": {
                    "is_recap_email_enabled": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "recipients": {
                        "type": "array",
                        "examples": [
                            [
                                "d431",
                                "12"
                            ]
                        ],
                        "items": {}
                    },
                    "extra_config": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "is_recap_email_enabled",
                    "recipients",
                    "extra_config"
                ],
                "title": "AccountAiConfigResource"
            },
            "AccountBillingInfoData": {
                "type": "object",
                "additionalProperties": {},
                "title": "AccountBillingInfoData"
            },
            "AccountInfoMenuOption": {
                "type": "object",
                "properties": {
                    "account_id": {
                        "type": "string"
                    },
                    "menu_id": {
                        "type": "integer"
                    },
                    "inbound_dial_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "welcome_msg": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "options_msg": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "menu_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "allow_dial_extension": {
                        "type": "integer"
                    },
                    "id": {
                        "type": "integer"
                    },
                    "options_msg_enabled": {
                        "type": "integer"
                    },
                    "pub_holiday_country": {
                        "type": "string"
                    },
                    "a1st_pause_timer": {
                        "type": "string"
                    },
                    "a2nd_pause_timer": {
                        "type": "string"
                    }
                },
                "required": [
                    "account_id",
                    "menu_id",
                    "inbound_dial_seconds",
                    "welcome_msg",
                    "options_msg",
                    "menu_name",
                    "allow_dial_extension",
                    "id",
                    "options_msg_enabled",
                    "pub_holiday_country",
                    "a1st_pause_timer",
                    "a2nd_pause_timer"
                ],
                "title": "AccountInfoMenuOption"
            },
            "AccountIpWhitelist": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "ip_address": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "ip_address"
                ],
                "title": "AccountIpWhitelist"
            },
            "AccountLanguageConfigResource": {
                "type": "object",
                "properties": {
                    "number_languages": {
                        "type": "array",
                        "items": {}
                    },
                    "voicemail_languages": {
                        "type": "array",
                        "items": {}
                    },
                    "number_overrides": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/NumberLanguageOverrideResource"
                        }
                    },
                    "voicemail_overrides": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/VoicemailLanguageOverrideResource"
                        }
                    }
                },
                "required": [
                    "number_languages",
                    "voicemail_languages",
                    "number_overrides",
                    "voicemail_overrides"
                ],
                "title": "AccountLanguageConfigResource"
            },
            "AccountOauthSettings": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "provider": {
                        "type": "integer"
                    },
                    "is_enabled": {
                        "type": "boolean"
                    },
                    "config": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "provider_name": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "provider",
                    "is_enabled",
                    "config",
                    "created_at",
                    "updated_at",
                    "provider_name"
                ],
                "title": "AccountOauthSettings"
            },
            "AccountQueueHeadsetResource": {
                "type": "object",
                "properties": {
                    "account_id": {
                        "type": "string",
                        "examples": [
                            "IE-00000"
                        ]
                    },
                    "queue_id": {
                        "type": "integer",
                        "examples": [
                            6807551
                        ]
                    },
                    "extension_number": {
                        "type": "integer",
                        "examples": [
                            31
                        ]
                    },
                    "priority": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "order": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "is_dynamic": {
                        "type": "boolean",
                        "examples": [
                            true
                        ]
                    },
                    "queue": {
                        "$ref": "#/components/schemas/App.Http.Resources.Api.V2.AccountQueueResource"
                    }
                },
                "required": [
                    "account_id",
                    "queue_id",
                    "extension_number",
                    "priority",
                    "order",
                    "is_dynamic"
                ],
                "title": "AccountQueueHeadsetResource"
            },
            "AccountQueueResource": {
                "type": "object",
                "properties": {
                    "queue_id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "queue_number": {
                        "type": "integer",
                        "examples": [
                            10
                        ]
                    },
                    "queue_name": {
                        "type": "string",
                        "examples": [
                            "Sales"
                        ]
                    },
                    "queue_desc": {
                        "type": "string"
                    }
                },
                "required": [
                    "queue_id",
                    "queue_number",
                    "queue_name",
                    "queue_desc"
                ],
                "title": "AccountQueueResource"
            },
            "AccountQueueWithHeadsetResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "examples": [
                            "1"
                        ]
                    },
                    "number": {
                        "type": "string",
                        "examples": [
                            "10"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Sales Queue"
                        ]
                    },
                    "agents": {
                        "type": "string",
                        "examples": [
                            "5"
                        ]
                    },
                    "agents_description": {
                        "type": "array",
                        "items": {}
                    },
                    "queue_config": {
                        "type": "object",
                        "properties": {
                            "timeout_in": {
                                "type": "string",
                                "examples": [
                                    "30"
                                ]
                            },
                            "timeout_action": {
                                "type": "string",
                                "examples": [
                                    "1"
                                ]
                            },
                            "timeout_action_value": {
                                "type": "string"
                            },
                            "backup_type": {
                                "type": "string",
                                "examples": [
                                    "1"
                                ]
                            },
                            "backup_value": {
                                "type": "string"
                            },
                            "callee_announcement": {
                                "type": "string",
                                "examples": [
                                    "1"
                                ]
                            },
                            "periodic_announcement": {
                                "type": "integer",
                                "examples": [
                                    0
                                ]
                            },
                            "transfer_bounceback": {
                                "type": "string",
                                "examples": [
                                    "0"
                                ]
                            },
                            "transfer_bounceback_timeout": {
                                "type": "string",
                                "examples": [
                                    "30"
                                ]
                            },
                            "queue_settings": {
                                "type": "string",
                                "examples": [
                                    "1"
                                ]
                            },
                            "show_queue_name": {
                                "type": "string",
                                "examples": [
                                    "1"
                                ]
                            },
                            "ring_strategy": {
                                "type": "string",
                                "examples": [
                                    "ringall"
                                ]
                            },
                            "ring_agent_timeout": {
                                "type": "string",
                                "examples": [
                                    "15"
                                ]
                            },
                            "ring_in_use": {
                                "type": "string",
                                "examples": [
                                    "0"
                                ]
                            },
                            "wrap_up_time": {
                                "type": "string",
                                "examples": [
                                    "0"
                                ]
                            },
                            "moh_class": {
                                "type": "string",
                                "examples": [
                                    "default"
                                ]
                            },
                            "announce_position": {
                                "type": "string",
                                "enum": [
                                    "1",
                                    "0"
                                ],
                                "examples": [
                                    "1"
                                ]
                            },
                            "announce_position_frequency": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "timeout_in",
                            "timeout_action",
                            "timeout_action_value",
                            "backup_type",
                            "backup_value",
                            "callee_announcement",
                            "periodic_announcement",
                            "transfer_bounceback",
                            "transfer_bounceback_timeout",
                            "queue_settings",
                            "show_queue_name",
                            "ring_strategy",
                            "ring_agent_timeout",
                            "ring_in_use",
                            "wrap_up_time",
                            "moh_class",
                            "announce_position",
                            "announce_position_frequency"
                        ]
                    },
                    "can_delete": {
                        "anyOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "success": {
                                        "type": "boolean"
                                    },
                                    " allowed": {
                                        "type": "boolean"
                                    },
                                    "message": {
                                        "type": "array",
                                        "items": {}
                                    }
                                },
                                "required": [
                                    "success",
                                    " allowed",
                                    "message"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "allowed": {
                                        "type": "boolean"
                                    }
                                },
                                "required": [
                                    "allowed"
                                ]
                            }
                        ]
                    }
                },
                "required": [
                    "id",
                    "number",
                    "name",
                    "agents",
                    "agents_description",
                    "queue_config",
                    "can_delete"
                ],
                "title": "AccountQueueWithHeadsetResource"
            },
            "AccountSecuritySettingsResource": {
                "type": "object",
                "properties": {
                    "account_id": {
                        "type": "string"
                    },
                    "allow_local_login": {
                        "type": "boolean"
                    },
                    "allow_sso_logins": {
                        "type": "boolean"
                    },
                    "enable_ip_restrictions": {
                        "type": "boolean"
                    },
                    "should_periodically_reset": {
                        "type": "boolean"
                    },
                    "reset_period_months": {
                        "type": "integer"
                    },
                    "require_2fa": {
                        "type": "boolean"
                    },
                    "password_min_length": {
                        "type": "integer"
                    },
                    "password_must_mixed_case": {
                        "type": "boolean"
                    },
                    "password_must_include_numbers": {
                        "type": "boolean"
                    },
                    "password_must_include_symbols": {
                        "type": "boolean"
                    },
                    "password_is_uncompromised": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": "null"
                    },
                    "updated_at": {
                        "type": "null"
                    },
                    "oauth": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/AccountOauthSettings"
                        }
                    },
                    "ip_whitelist": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/AccountIpWhitelist"
                        }
                    }
                },
                "required": [
                    "account_id",
                    "allow_local_login",
                    "allow_sso_logins",
                    "enable_ip_restrictions",
                    "should_periodically_reset",
                    "reset_period_months",
                    "require_2fa",
                    "password_min_length",
                    "password_must_mixed_case",
                    "password_must_include_numbers",
                    "password_must_include_symbols",
                    "password_is_uncompromised",
                    "created_at",
                    "updated_at",
                    "oauth",
                    "ip_whitelist"
                ],
                "title": "AccountSecuritySettingsResource"
            },
            "ActivateAiSttRequest": {
                "type": "object",
                "properties": {
                    "addon_id": {
                        "type": "string",
                        "description": "The ID of the addon to activate",
                        "examples": [
                            1124
                        ]
                    },
                    "paymentMethod": {
                        "type": "string",
                        "description": "Stripe PM_ID if addon is paid",
                        "examples": [
                            "pm_222"
                        ]
                    }
                },
                "required": [
                    "addon_id"
                ],
                "title": "ActivateAiSttRequest"
            },
            "AddCallNoteRequest": {
                "type": "object",
                "properties": {
                    "note": {
                        "type": "string",
                        "description": "Note",
                        "examples": [
                            "Follow up required"
                        ],
                        "maxLength": 1000
                    },
                    "callId": {
                        "type": "string",
                        "description": "Call ID",
                        "examples": [
                            "1234567890.123"
                        ],
                        "maxLength": 100
                    }
                },
                "required": [
                    "note",
                    "callId"
                ],
                "title": "AddCallNoteRequest"
            },
            "AddCallTagRequest": {
                "type": "object",
                "properties": {
                    "call_id": {
                        "type": "string",
                        "description": "Call ID",
                        "examples": [
                            "1234567890.123"
                        ],
                        "maxLength": 100
                    },
                    "tag_info_id": {
                        "type": "integer",
                        "description": "Tag Info ID",
                        "examples": [
                            42
                        ],
                        "minimum": 1
                    }
                },
                "required": [
                    "call_id",
                    "tag_info_id"
                ],
                "title": "AddCallTagRequest"
            },
            "AddExtSubscriptionRequest": {
                "type": "object",
                "properties": {
                    "subscription_id": {
                        "type": "integer",
                        "description": "Subscription ID",
                        "examples": [
                            1
                        ]
                    },
                    "extension_number": {
                        "type": "string",
                        "description": "Extension number",
                        "examples": [
                            100
                        ]
                    }
                },
                "required": [
                    "subscription_id",
                    "extension_number"
                ],
                "title": "AddExtSubscriptionRequest"
            },
            "AddMessageRequest": {
                "type": "object",
                "properties": {
                    "channel_type": {
                        "type": "string",
                        "description": "Channel type",
                        "enum": [
                            "1",
                            "2",
                            "3"
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "content": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Message content",
                        "examples": [
                            "Hello, how can I help?"
                        ]
                    },
                    "content_url": {
                        "type": "string",
                        "format": "uri",
                        "description": "URL for media content",
                        "examples": [
                            "https://example.com/image.jpg"
                        ]
                    },
                    "content_file": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application/octet-stream",
                        "description": "Maximum file size: 16384 kilobytes."
                    },
                    "message_type": {
                        "type": "integer",
                        "description": "Message type identifier",
                        "examples": [
                            1
                        ]
                    },
                    "is_draft": {
                        "type": "boolean",
                        "description": "Whether message is a draft",
                        "examples": [
                            false
                        ]
                    },
                    "scheduled_for": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Scheduled send time",
                        "examples": [
                            "2026-01-15 14:30:00"
                        ]
                    },
                    "metadata": {
                        "type": "object",
                        "description": "Additional message metadata: `template_id` and `template_variables` for a template message, `location` {latitude, longitude, label} for a WhatsApp location",
                        "examples": [
                            {
                                "template_id": 23972,
                                "template_variables": [
                                    "Anna",
                                    "Monday 10:00"
                                ]
                            }
                        ],
                        "properties": {
                            "template_id": {
                                "type": "string"
                            },
                            "template_variables": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "location": {
                                "type": "object",
                                "properties": {
                                    "latitude": {
                                        "type": "number",
                                        "minimum": -90,
                                        "maximum": 90
                                    },
                                    "longitude": {
                                        "type": "number",
                                        "minimum": -180,
                                        "maximum": 180
                                    },
                                    "label": {
                                        "type": "string",
                                        "maxLength": 100
                                    }
                                }
                            }
                        }
                    },
                    "media_ids": {
                        "type": "array",
                        "description": "IDs from POST /v2/mms/media (max 10) to send the message as MMS",
                        "examples": [
                            [
                                "3facde2c-6f3b-4a4e-9d1e-2b1f0c9a8d77"
                            ]
                        ],
                        "items": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "maxItems": 10
                    }
                },
                "title": "AddMessageRequest"
            },
            "AddonCostData": {
                "type": "object",
                "properties": {
                    "transactionName": {
                        "type": "string",
                        "description": "Derived from the addon name and the billing period, so it is computed in the constructor."
                    },
                    "unitPrice": {
                        "type": "number"
                    },
                    "addonName": {
                        "type": "string"
                    },
                    "accountVatRate": {
                        "type": "string"
                    },
                    "cleanAmount": {
                        "type": "string"
                    },
                    "vatAmount": {
                        "type": "number"
                    },
                    "extensionsCount": {
                        "type": "null"
                    },
                    "subTotal": {
                        "type": "number"
                    },
                    "total": {
                        "type": "number"
                    },
                    "billingPeriodStart": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "billingPeriodEnd": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "billingCurrency": {
                        "type": "string"
                    },
                    "isNextMonth": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "transactionName",
                    "unitPrice",
                    "addonName",
                    "accountVatRate",
                    "cleanAmount",
                    "vatAmount",
                    "extensionsCount",
                    "subTotal",
                    "total",
                    "billingPeriodStart",
                    "billingPeriodEnd",
                    "billingCurrency",
                    "isNextMonth"
                ],
                "title": "AddonCostData"
            },
            "AddonItemResource": {
                "type": "object",
                "properties": {
                    "entry_id": {
                        "type": "integer",
                        "examples": [
                            5001
                        ]
                    },
                    "addon_detail": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Call Recording"
                        ]
                    },
                    "added_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "2024-01-15"
                        ]
                    },
                    "status": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "cancel_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            null
                        ]
                    },
                    "qty": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "addon": {
                        "$ref": "#/components/schemas/AddonResource"
                    }
                },
                "required": [
                    "entry_id",
                    "addon_detail",
                    "added_date",
                    "status",
                    "cancel_date",
                    "qty"
                ],
                "title": "AddonItemResource"
            },
            "AddonResource": {
                "type": "object",
                "properties": {
                    "addon_id": {
                        "type": "integer",
                        "examples": [
                            10
                        ]
                    },
                    "addon_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Call Recording"
                        ]
                    },
                    "addon_type": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "addon_details": {
                        "type": "integer",
                        "examples": [
                            0
                        ]
                    },
                    "addon_note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Enables call recording"
                        ]
                    },
                    "visible": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "is_extension_dependent": {
                        "type": "integer",
                        "examples": [
                            false
                        ]
                    }
                },
                "required": [
                    "addon_id",
                    "addon_name",
                    "addon_type",
                    "addon_details",
                    "addon_note",
                    "visible",
                    "is_extension_dependent"
                ],
                "title": "AddonResource"
            },
            "AfterCallWorkUpsertRequest": {
                "type": "array",
                "description": "Array of after call work rules to upsert.",
                "items": {
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "direction": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "inbound",
                                "outbound",
                                "both",
                                null
                            ]
                        },
                        "number": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": "string"
                            }
                        },
                        "queue_id": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": "string"
                            }
                        },
                        "tags": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        },
                        "notes": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        },
                        "timer": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "maximum": 180
                        }
                    },
                    "required": [
                        "id"
                    ]
                },
                "minItems": 1,
                "maxItems": 100,
                "title": "AfterCallWorkUpsertRequest"
            },
            "AgentQueueHeadsetRequest": {
                "type": "object",
                "properties": {
                    "queue_number": {
                        "type": "integer",
                        "description": "Queue number",
                        "examples": [
                            10
                        ]
                    },
                    "extension_number": {
                        "type": "integer",
                        "description": "Extension number",
                        "examples": [
                            31
                        ]
                    },
                    "priority": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Queue member priority",
                        "examples": [
                            0
                        ],
                        "minimum": 0,
                        "maximum": 59
                    },
                    "order": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Order for extension in queue strategy",
                        "examples": [
                            0
                        ],
                        "minimum": 0
                    },
                    "is_dynamic": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Whether this is a dynamic agent",
                        "examples": [
                            false
                        ]
                    }
                },
                "required": [
                    "queue_number",
                    "extension_number"
                ],
                "title": "AgentQueueHeadsetRequest"
            },
            "App.Http.Requests.Api.V3.ContactRequest": {
                "type": "object",
                "properties": {
                    "phones": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Phones; required unless an email is given",
                        "examples": [
                            [
                                "+353123456789"
                            ]
                        ],
                        "items": {
                            "type": "string",
                            "maxLength": 20
                        },
                        "maxItems": 5
                    },
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "First Name",
                        "examples": [
                            "John"
                        ],
                        "maxLength": 100
                    },
                    "last_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Last Name",
                        "examples": [
                            "Doe"
                        ],
                        "maxLength": 100
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "description": "Email; required unless at least one phone is given",
                        "examples": [
                            "john@example.com"
                        ],
                        "maxLength": 50
                    },
                    "address_1": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Address 1",
                        "examples": [
                            "123 Main Street"
                        ],
                        "maxLength": 100
                    },
                    "address_2": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Address 2",
                        "examples": [
                            "Apt 4"
                        ],
                        "maxLength": 100
                    },
                    "address_3": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Address 3",
                        "examples": [
                            "Dublin"
                        ],
                        "maxLength": 100
                    },
                    "address_4": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Address 4",
                        "examples": [
                            "Co. Dublin"
                        ],
                        "maxLength": 100
                    },
                    "post_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Post Code",
                        "examples": [
                            "D01 F5P2"
                        ],
                        "maxLength": 10
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Alpha 2 chars ISO Country Code",
                        "examples": [
                            "IE"
                        ]
                    },
                    "comments": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Comments",
                        "examples": [
                            "Important client"
                        ],
                        "maxLength": 500
                    },
                    "birthdate": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Birth date",
                        "examples": [
                            "1990-01-15"
                        ]
                    },
                    "private": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Private Contact?",
                        "examples": [
                            false
                        ]
                    },
                    "groups": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Groups",
                        "examples": [
                            [
                                1,
                                2
                            ]
                        ],
                        "items": {
                            "type": "integer"
                        }
                    },
                    "organizations": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Organizations",
                        "items": {
                            "type": "integer"
                        }
                    }
                },
                "title": "App.Http.Requests.Api.V3.ContactRequest"
            },
            "App.Http.Resources.Api.V2.AccountQueueResource": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Sales"
                        ]
                    },
                    "number": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            10
                        ]
                    },
                    "description": {
                        "type": "string",
                        "examples": [
                            "Sales Department"
                        ]
                    }
                },
                "required": [
                    "name",
                    "number",
                    "description"
                ],
                "title": "App.Http.Resources.Api.V2.AccountQueueResource"
            },
            "App.Http.Resources.Api.V3.AccountQueueResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Sales"
                        ]
                    },
                    "number": {
                        "type": "integer",
                        "examples": [
                            10
                        ]
                    },
                    "description": {
                        "type": "string",
                        "description": "Queue Description @example \"Main sales queue\""
                    }
                },
                "required": [
                    "id",
                    "name",
                    "number",
                    "description"
                ],
                "title": "App.Http.Resources.Api.V3.AccountQueueResource"
            },
            "App.Http.Resources.Api.V3.ContactAddressResource": {
                "type": "object",
                "properties": {
                    "country": {
                        "type": "string",
                        "description": "Country @example \"IE\""
                    },
                    "postcode": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Post Code @example \"D01 F5P2\""
                    },
                    "address_1": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Address line 1 @example \"123 Main Street\""
                    },
                    "address_2": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Address line 2 @example \"Apt 4\""
                    },
                    "address_3": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Address line 3 @example \"Dublin\""
                    },
                    "address_4": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Address line 4 @example \"Co. Dublin\""
                    }
                },
                "required": [
                    "country",
                    "postcode",
                    "address_1",
                    "address_2",
                    "address_3",
                    "address_4"
                ],
                "title": "App.Http.Resources.Api.V3.ContactAddressResource"
            },
            "App.Http.Resources.Api.V3.ContactGroupResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Test"
                        ]
                    },
                    "hex_color": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "#ffffff"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-05-12T13:25:12.000000Z"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-05-12T13:25:12.000000Z"
                        ]
                    },
                    "contacts_count": {
                        "type": "string",
                        "examples": [
                            "3"
                        ]
                    }
                },
                "required": [
                    "id",
                    "name",
                    "hex_color",
                    "created_at",
                    "updated_at"
                ],
                "title": "App.Http.Resources.Api.V3.ContactGroupResource"
            },
            "App.Http.Resources.Api.V3.ContactOrganizationResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Acme Corp"
                        ]
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "0035312345678"
                        ]
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "info@acme.com"
                        ]
                    },
                    "domain": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "acme.com"
                        ]
                    },
                    "address": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "123 Main Street"
                        ]
                    },
                    "address_2": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Suite 4B"
                        ]
                    },
                    "city": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Dublin"
                        ]
                    },
                    "county": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Co. Dublin"
                        ]
                    },
                    "post_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "D01 F5P2"
                        ]
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Ireland"
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Key enterprise client"
                        ]
                    },
                    "logo_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "https://static.nuacom.com/IE-04852/img/organisation-12-logo-a1b2.png"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-05-12T13:25:12.000000Z"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-05-12T13:25:12.000000Z"
                        ]
                    },
                    "contacts_count": {
                        "type": "string",
                        "examples": [
                            "2"
                        ]
                    }
                },
                "required": [
                    "id",
                    "name",
                    "phone",
                    "email",
                    "domain",
                    "address",
                    "address_2",
                    "city",
                    "county",
                    "post_code",
                    "country",
                    "notes",
                    "logo_url",
                    "created_at",
                    "updated_at"
                ],
                "title": "App.Http.Resources.Api.V3.ContactOrganizationResource"
            },
            "App.Http.Resources.Api.V3.ContactPhoneBookResource": {
                "type": "object",
                "properties": {
                    "contact_comments": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Contact comments @example \"VIP customer\""
                    },
                    "email_optout": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Email optout @example false"
                    },
                    "contact_dob": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Contact date of birth @example \"1990-01-15\""
                    },
                    "facebook_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            null
                        ]
                    },
                    "mailchimp_sync": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "examples": [
                            false
                        ]
                    },
                    "reference": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "REF-001"
                        ]
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "john@example.com"
                        ]
                    },
                    "owner_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Contact Owner ID @example null"
                    },
                    "document_expire_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Document expiration date @example \"2025-12-31\""
                    },
                    "contact_source": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Contact source @example \"website\""
                    }
                },
                "required": [
                    "contact_comments",
                    "email_optout",
                    "contact_dob",
                    "facebook_id",
                    "mailchimp_sync",
                    "reference",
                    "email",
                    "owner_id",
                    "document_expire_date",
                    "contact_source"
                ],
                "title": "App.Http.Resources.Api.V3.ContactPhoneBookResource"
            },
            "App.Http.Resources.Api.V3.ContactPhoneResource": {
                "type": "object",
                "properties": {
                    "phone_number": {
                        "type": "integer",
                        "examples": [
                            35312345678
                        ]
                    },
                    "number_type": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "number_type_text": {
                        "type": "string",
                        "examples": [
                            "Mobile"
                        ]
                    },
                    "sms_support": {
                        "type": "boolean",
                        "examples": [
                            true
                        ]
                    },
                    "sms_history": {
                        "type": "boolean",
                        "examples": [
                            true
                        ]
                    },
                    "sms_blocked": {
                        "type": "boolean",
                        "examples": [
                            false
                        ]
                    }
                },
                "required": [
                    "phone_number",
                    "number_type",
                    "number_type_text",
                    "sms_support",
                    "sms_history",
                    "sms_blocked"
                ],
                "title": "App.Http.Resources.Api.V3.ContactPhoneResource"
            },
            "App.Http.Resources.Api.V3.ContactResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Test"
                        ]
                    },
                    "last_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Test"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Test Test"
                        ]
                    },
                    "phones": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactPhoneResource"
                        }
                    },
                    "phonebook": {
                        "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactPhoneBookResource"
                    },
                    "address": {
                        "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactAddressResource"
                    },
                    "groups": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactGroupResource"
                        }
                    },
                    "organization": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactOrganizationResource"
                        }
                    },
                    "visibility": {
                        "type": "string",
                        "examples": [
                            "public"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-05-12T13:25:12.000000Z"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-05-12T13:25:12.000000Z"
                        ]
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            null
                        ]
                    }
                },
                "required": [
                    "id",
                    "first_name",
                    "last_name",
                    "name",
                    "visibility",
                    "updated_at",
                    "created_at",
                    "deleted_at"
                ],
                "title": "App.Http.Resources.Api.V3.ContactResource"
            },
            "AssignConversationRequest": {
                "type": "object",
                "properties": {
                    "user_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "User ID to assign the conversation to",
                        "examples": [
                            123
                        ]
                    },
                    "department_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Department ID to assign the conversation to",
                        "examples": [
                            5
                        ]
                    }
                },
                "title": "AssignConversationRequest"
            },
            "AuthRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "User email address",
                        "examples": [
                            "user@example.com"
                        ]
                    },
                    "pass": {
                        "type": "string",
                        "description": "User password",
                        "examples": [
                            "secret123"
                        ]
                    },
                    "remember": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Whether to remember the session",
                        "examples": [
                            true
                        ]
                    },
                    "two_fa_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Two-factor authentication code",
                        "examples": [
                            123456
                        ]
                    },
                    "use_raw_pass": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Whether to use raw (unhashed) password",
                        "examples": [
                            false
                        ]
                    }
                },
                "required": [
                    "email"
                ],
                "title": "AuthRequest"
            },
            "AutodialerCampaignNumberRequest": {
                "type": "object",
                "properties": {
                    "number": {
                        "type": "string",
                        "description": "Phone number",
                        "examples": [
                            "+353123456798"
                        ],
                        "maxLength": 30
                    },
                    "contact_id": {
                        "type": "integer",
                        "description": "Optional alternative to `number`: a contact whose phone number is\nresolved and added to the campaign. The store endpoint enforces\nthat either `number` or `contact_id` is provided.",
                        "examples": [
                            42
                        ]
                    },
                    "status": {
                        "description": "Status (initial, in_progress, not_answered, answered, voicemail)",
                        "examples": [
                            "in_progress"
                        ],
                        "$ref": "#/components/schemas/AutodialerCampaignNumberStatus"
                    }
                },
                "title": "AutodialerCampaignNumberRequest"
            },
            "AutodialerCampaignNumberResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "campaign_id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "number": {
                        "type": "string",
                        "examples": [
                            "+353123456789"
                        ]
                    },
                    "retries": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "last_retry": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-11-24T11:15:54.000000Z"
                        ]
                    },
                    "status": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "initial"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-11-24T11:15:54.000000Z"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-11-24T11:15:54.000000Z"
                        ]
                    }
                },
                "required": [
                    "id",
                    "campaign_id",
                    "number",
                    "retries",
                    "last_retry",
                    "status",
                    "created_at",
                    "updated_at"
                ],
                "title": "AutodialerCampaignNumberResource"
            },
            "AutodialerCampaignNumberStatus": {
                "type": "string",
                "enum": [
                    "initial",
                    "in_progress",
                    "not_answered",
                    "answered",
                    "voicemail"
                ],
                "title": "AutodialerCampaignNumberStatus"
            },
            "AutodialerCampaignNumberUploadRequest": {
                "type": "object",
                "properties": {
                    "numbers": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "maxLength": 250
                        },
                        "minItems": 1,
                        "maxItems": 2000
                    }
                },
                "required": [
                    "numbers"
                ],
                "title": "AutodialerCampaignNumberUploadRequest"
            },
            "AutodialerCampaignResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "account_id": {
                        "type": "string",
                        "examples": [
                            "IE-12345"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Test Campaign"
                        ]
                    },
                    "delay": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            15
                        ]
                    },
                    "phone_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "+353123456789"
                        ]
                    },
                    "max_response_time": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            10
                        ]
                    },
                    "max_retries": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            3
                        ]
                    },
                    "sign_to": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "John doe (ext.32)"
                        ]
                    },
                    "time_to_recall": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            60
                        ]
                    },
                    "status": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "not-running"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-11-24T11:15:54.000000Z"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-11-24T11:15:54.000000Z"
                        ]
                    },
                    "numbers_count": {
                        "type": "integer",
                        "examples": [
                            50
                        ],
                        "minimum": 0
                    },
                    "stats": {
                        "type": "object",
                        "properties": {
                            "answered": {
                                "type": "string",
                                "examples": [
                                    "25"
                                ]
                            },
                            "not_answered": {
                                "type": "string",
                                "examples": [
                                    "10"
                                ]
                            },
                            "all": {
                                "type": "integer",
                                "examples": [
                                    50
                                ],
                                "minimum": 0
                            },
                            "percentage": {
                                "type": "integer",
                                "examples": [
                                    70
                                ]
                            }
                        },
                        "required": [
                            "answered",
                            "not_answered",
                            "all",
                            "percentage"
                        ]
                    }
                },
                "required": [
                    "id",
                    "account_id",
                    "name",
                    "delay",
                    "phone_number",
                    "max_response_time",
                    "max_retries",
                    "sign_to",
                    "time_to_recall",
                    "status",
                    "created_at",
                    "updated_at",
                    "numbers_count",
                    "stats"
                ],
                "title": "AutodialerCampaignResource"
            },
            "AutodialerCampaignStoreRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Campaign name",
                        "examples": [
                            "Test Campaign"
                        ],
                        "maxLength": 250
                    },
                    "delay": {
                        "type": "integer",
                        "description": "Delay in seconds",
                        "examples": [
                            15
                        ],
                        "minimum": 1
                    },
                    "phone_number": {
                        "type": "string",
                        "description": "Callee number",
                        "examples": [
                            "+353123456789"
                        ],
                        "maxLength": 30
                    },
                    "max_response_time": {
                        "type": "integer",
                        "description": "Max response time in seconds",
                        "examples": [
                            10
                        ],
                        "minimum": 1
                    },
                    "max_retries": {
                        "type": "integer",
                        "description": "Max retries",
                        "examples": [
                            3
                        ],
                        "minimum": 0
                    },
                    "sign_to": {
                        "type": "string",
                        "description": "Assigned extension",
                        "examples": [
                            "John doe (ext.32)"
                        ],
                        "maxLength": 250
                    },
                    "time_to_recall": {
                        "type": "integer",
                        "description": "Time to recall in minutes",
                        "examples": [
                            60
                        ],
                        "minimum": 1
                    },
                    "status": {
                        "type": "string",
                        "description": "Campaign status",
                        "examples": [
                            "not-running"
                        ],
                        "maxLength": 50
                    },
                    "contacts": {
                        "type": "array",
                        "description": "Contact numbers",
                        "items": {
                            "type": "string",
                            "maxLength": 250
                        },
                        "maxItems": 2000
                    }
                },
                "required": [
                    "name",
                    "delay",
                    "phone_number",
                    "max_response_time",
                    "max_retries",
                    "sign_to"
                ],
                "title": "AutodialerCampaignStoreRequest"
            },
            "AutodialerCampaignUpdateRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Campaign name",
                        "examples": [
                            "Test Campaign"
                        ],
                        "maxLength": 250
                    },
                    "delay": {
                        "type": "integer",
                        "description": "Delay in seconds",
                        "examples": [
                            15
                        ],
                        "minimum": 1
                    },
                    "phone_number": {
                        "type": "string",
                        "description": "Callee number",
                        "examples": [
                            "+353123456789"
                        ],
                        "maxLength": 30
                    },
                    "max_response_time": {
                        "type": "integer",
                        "description": "Max response time in seconds",
                        "examples": [
                            10
                        ],
                        "minimum": 1
                    },
                    "max_retries": {
                        "type": "integer",
                        "description": "Max retries",
                        "examples": [
                            3
                        ],
                        "minimum": 0
                    },
                    "sign_to": {
                        "type": "string",
                        "description": "Assigned extension",
                        "examples": [
                            "John doe (ext.32)"
                        ],
                        "maxLength": 250
                    },
                    "time_to_recall": {
                        "type": "integer",
                        "description": "Time to recall in minutes",
                        "examples": [
                            60
                        ],
                        "minimum": 1
                    },
                    "status": {
                        "type": "string",
                        "description": "Campaign status",
                        "examples": [
                            "not-running"
                        ],
                        "maxLength": 50
                    },
                    "contacts": {
                        "type": "array",
                        "description": "Contact numbers",
                        "items": {
                            "type": "string",
                            "maxLength": 250
                        },
                        "maxItems": 2000
                    }
                },
                "title": "AutodialerCampaignUpdateRequest"
            },
            "BalanceAutoTopUpResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "account_id": {
                        "type": "string",
                        "examples": [
                            "IE-00491"
                        ]
                    },
                    "user_id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "payment_type": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            2
                        ]
                    },
                    "payment_method": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "pm_1LD5nSAfZ3HRScSs8z5TF55a"
                        ]
                    },
                    "amount": {
                        "type": "integer",
                        "examples": [
                            20
                        ]
                    },
                    "balance_limit": {
                        "type": "integer",
                        "examples": [
                            20
                        ]
                    },
                    "set_time": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-08-11T12:42:52.000000Z"
                        ]
                    }
                },
                "required": [
                    "id",
                    "account_id",
                    "user_id",
                    "payment_type",
                    "payment_method",
                    "amount",
                    "balance_limit",
                    "set_time"
                ],
                "title": "BalanceAutoTopUpResource"
            },
            "BlackListNumbersRequest": {
                "type": "object",
                "properties": {
                    "mobile_number": {
                        "type": "string",
                        "description": "Mobile number to be blocked",
                        "examples": [
                            "0037379123456"
                        ],
                        "maxLength": 20
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optional reason or notes for blocking",
                        "examples": [
                            "User requested block"
                        ],
                        "maxLength": 50
                    }
                },
                "required": [
                    "mobile_number"
                ],
                "title": "BlackListNumbersRequest"
            },
            "BlackListNumbersResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            123
                        ]
                    },
                    "mobile_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "0037379123456"
                        ]
                    },
                    "account": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "IE-00491"
                        ]
                    },
                    "status": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "2-manually blocked | 3-opted out | 4-suspected inactive",
                        "examples": [
                            2
                        ]
                    },
                    "notes": {
                        "type": "string",
                        "examples": [
                            "User requested block"
                        ]
                    },
                    "entrydate": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-05-08T14:30:00"
                        ]
                    }
                },
                "required": [
                    "id",
                    "mobile_number",
                    "account",
                    "status",
                    "notes",
                    "entrydate"
                ],
                "title": "BlackListNumbersResource"
            },
            "BlockUnblockCallRequest": {
                "type": "object",
                "properties": {
                    "action": {
                        "description": "Block or unblock action",
                        "examples": [
                            1
                        ],
                        "$ref": "#/components/schemas/CallBlockUnblockOption"
                    },
                    "extensions": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "All or comma separated extensions list",
                        "examples": [
                            "all"
                        ]
                    },
                    "destinations": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "All or comma separated destinations",
                        "examples": [
                            "1,2"
                        ]
                    }
                },
                "required": [
                    "action"
                ],
                "title": "BlockUnblockCallRequest"
            },
            "BulkAddContactsToGroupsRequest": {
                "type": "object",
                "properties": {
                    "contacts": {
                        "type": "array",
                        "description": "IDs of contacts to assign",
                        "examples": [
                            [
                                1,
                                2,
                                3
                            ]
                        ],
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1
                    },
                    "groups": {
                        "type": "array",
                        "description": "IDs of groups to assign",
                        "examples": [
                            [
                                10,
                                11
                            ]
                        ],
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "contacts",
                    "groups"
                ],
                "title": "BulkAddContactsToGroupsRequest"
            },
            "BulkAddContactsToOrganizationRequest": {
                "type": "object",
                "properties": {
                    "contacts": {
                        "type": "array",
                        "description": "IDs of contacts to assign",
                        "examples": [
                            [
                                1,
                                2,
                                3
                            ]
                        ],
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1
                    },
                    "organizations": {
                        "type": "array",
                        "description": "IDs of the organizations to assign the contacts to",
                        "examples": [
                            [
                                10,
                                11
                            ]
                        ],
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "contacts",
                    "organizations"
                ],
                "title": "BulkAddContactsToOrganizationRequest"
            },
            "BulkChangeVisibilityRequest": {
                "type": "object",
                "properties": {
                    "contacts": {
                        "type": "array",
                        "description": "IDs of contacts to update",
                        "examples": [
                            [
                                1,
                                2,
                                3
                            ]
                        ],
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1
                    },
                    "visible": {
                        "type": "boolean",
                        "description": "Whether contacts should be visible",
                        "examples": [
                            true
                        ]
                    }
                },
                "required": [
                    "contacts",
                    "visible"
                ],
                "title": "BulkChangeVisibilityRequest"
            },
            "CalculateBalanceTopUpRequest": {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "integer",
                        "description": "Top up amount",
                        "examples": [
                            20
                        ],
                        "minimum": 1,
                        "maximum": 9999
                    }
                },
                "required": [
                    "amount"
                ],
                "title": "CalculateBalanceTopUpRequest"
            },
            "CalculateSmsTopUpRequest": {
                "type": "object",
                "properties": {
                    "package_id": {
                        "type": "integer",
                        "description": "SMS package identifier",
                        "examples": [
                            3
                        ]
                    }
                },
                "required": [
                    "package_id"
                ],
                "title": "CalculateSmsTopUpRequest"
            },
            "CallActivityResource": {
                "type": "object",
                "properties": {
                    "date": {
                        "type": "string",
                        "description": "Call Date @example \"2024-03-13T12:00:00+00:00\""
                    },
                    "call_id": {
                        "type": "string",
                        "description": "Call ID @example \"123456789\""
                    },
                    "call_state": {
                        "type": "string",
                        "description": "Call State @example \"ANSWERED\""
                    },
                    "call_from": {
                        "type": "object",
                        "properties": {
                            "number": {
                                "type": "string",
                                "description": "Caller Number @example \"+1234567890\""
                            },
                            "contact": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "integer"
                                    },
                                    "name": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "id",
                                    "name"
                                ]
                            }
                        },
                        "required": [
                            "number",
                            "contact"
                        ]
                    },
                    "call_to": {
                        "type": "object",
                        "properties": {
                            "number": {
                                "type": "string",
                                "description": "Receiver Number @example \"+0987654321\""
                            },
                            "contact": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "integer"
                                    },
                                    "name": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "id",
                                    "name"
                                ]
                            }
                        },
                        "required": [
                            "number",
                            "contact"
                        ]
                    },
                    "call_duration": {
                        "type": "integer",
                        "description": "Call Duration (seconds) @example 120"
                    },
                    "has_recording": {
                        "type": "boolean",
                        "description": "Call Recording Available @example true"
                    }
                },
                "required": [
                    "date",
                    "call_id",
                    "call_state",
                    "call_from",
                    "call_to",
                    "call_duration",
                    "has_recording"
                ],
                "title": "CallActivityResource"
            },
            "CallAutoTopUpResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "account_id": {
                        "type": "string",
                        "examples": [
                            "IE-00491"
                        ]
                    },
                    "user_id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "payment_type": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            2
                        ]
                    },
                    "payment_method": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "pm_1LD5nSAfZ3HRScSs8z5TF55a"
                        ]
                    },
                    "amount": {
                        "type": "integer",
                        "examples": [
                            20
                        ]
                    },
                    "credit_limit": {
                        "type": "integer",
                        "examples": [
                            20
                        ]
                    },
                    "set_time": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-08-11T12:42:52.000000Z"
                        ]
                    }
                },
                "required": [
                    "id",
                    "account_id",
                    "user_id",
                    "payment_type",
                    "payment_method",
                    "amount",
                    "credit_limit",
                    "set_time"
                ],
                "title": "CallAutoTopUpResource"
            },
            "CallBlockUnblockOption": {
                "type": "integer",
                "enum": [
                    0,
                    1
                ],
                "title": "CallBlockUnblockOption"
            },
            "CallBlockingCollectionResource": {
                "type": "object",
                "properties": {
                    "aaData": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "aaData"
                ],
                "title": "CallBlockingCollectionResource"
            },
            "CallNote": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "call_id": {
                        "type": "string"
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "account_id": {
                        "type": "string"
                    },
                    "user_id": {
                        "type": "integer"
                    },
                    "note_time": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "call_id",
                    "note",
                    "account_id",
                    "user_id",
                    "note_time"
                ],
                "title": "CallNote"
            },
            "CallNotesRequest": {
                "type": "object",
                "properties": {
                    "note": {
                        "type": "string",
                        "description": "Note",
                        "examples": [
                            "Follow up required"
                        ],
                        "maxLength": 1000
                    },
                    "callId": {
                        "type": "string",
                        "description": "Call ID",
                        "examples": [
                            "1234567890.123"
                        ],
                        "maxLength": 100
                    }
                },
                "required": [
                    "note",
                    "callId"
                ],
                "title": "CallNotesRequest"
            },
            "CallRateCountryResource": {
                "type": "object",
                "properties": {
                    "country_code": {
                        "type": "string",
                        "description": "ISO 3166-1 alpha-2 @example IE"
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Ireland"
                        ]
                    }
                },
                "required": [
                    "country_code",
                    "name"
                ],
                "title": "CallRateCountryResource"
            },
            "CallRateResource": {
                "type": "object",
                "properties": {
                    "network": {
                        "type": "string",
                        "examples": [
                            "IRELAND CARPHONE MOBILE"
                        ]
                    },
                    "number_type": {
                        "type": "integer",
                        "description": "0 fixed, 1 mobile, 3 toll_free, 4 premium, 99 undefined (any other libphonenumber type) @example 1"
                    },
                    "rate": {
                        "type": "number",
                        "description": "Price per minute in the account's billing currency, ex-VAT, as stored (5 decimals) @example 0.04215"
                    }
                },
                "required": [
                    "network",
                    "number_type",
                    "rate"
                ],
                "title": "CallRateResource"
            },
            "CallRoutingInbound": {
                "type": "object",
                "properties": {
                    "account_code": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "in_ext": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "use_macro": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "geo_number": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "geo_number_2": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "number_state": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "number_type": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "notes": {
                        "type": "string"
                    },
                    "hosting_provider": {
                        "type": "integer"
                    },
                    "country_code": {
                        "type": "string"
                    },
                    "number_name": {
                        "type": "string"
                    },
                    "use_number_name": {
                        "type": "integer"
                    },
                    "id": {
                        "type": "integer"
                    },
                    "max_concurrent_calls": {
                        "type": "integer"
                    },
                    "limit_per_second": {
                        "type": "integer"
                    },
                    "monitoring_limit_alert": {
                        "type": "boolean"
                    },
                    "support_sms": {
                        "type": "boolean"
                    },
                    "is_external": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "account_code",
                    "in_ext",
                    "use_macro",
                    "geo_number",
                    "geo_number_2",
                    "number_state",
                    "number_type",
                    "notes",
                    "hosting_provider",
                    "country_code",
                    "number_name",
                    "use_number_name",
                    "id",
                    "max_concurrent_calls",
                    "limit_per_second",
                    "monitoring_limit_alert",
                    "support_sms",
                    "is_external"
                ],
                "title": "CallRoutingInbound"
            },
            "CallSpeechToTextResource": {
                "type": "object",
                "properties": {
                    "combinedRecognizedPhrases": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0,
                                "additionalItems": false
                            }
                        ]
                    },
                    "recognizedPhrases": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0,
                                "additionalItems": false
                            }
                        ]
                    },
                    "conversationTopics": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0,
                                "additionalItems": false
                            }
                        ]
                    },
                    "summary": {
                        "examples": [
                            "Call summary text"
                        ],
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "string",
                                "enum": [
                                    ""
                                ]
                            }
                        ]
                    },
                    "doc": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0,
                                "additionalItems": false
                            }
                        ]
                    },
                    "balance": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "120.5"
                        ]
                    },
                    "ai_licence": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Licensing accounts only: the AI licence this call runs under,\n\"paid\", \"free\" or null for none.",
                        "examples": [
                            "free"
                        ]
                    },
                    "upgrade_target": {
                        "type": "string",
                        "description": "Licensing accounts only: where \"Upgrade Now\" leads.",
                        "examples": [
                            "licensing"
                        ]
                    },
                    "sentiment": {
                        "examples": [
                            "positive"
                        ],
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "string",
                                "enum": [
                                    "unknown"
                                ]
                            }
                        ]
                    },
                    "topics": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0,
                                "additionalItems": false
                            }
                        ]
                    },
                    "actionItems": {
                        "examples": [
                            "Follow up with client on proposal"
                        ],
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "string",
                                "enum": [
                                    ""
                                ]
                            }
                        ]
                    },
                    "talkTime": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "95"
                        ]
                    }
                },
                "required": [
                    "combinedRecognizedPhrases",
                    "recognizedPhrases",
                    "conversationTopics",
                    "summary",
                    "doc",
                    "balance",
                    "sentiment",
                    "topics",
                    "actionItems",
                    "talkTime"
                ],
                "title": "CallSpeechToTextResource"
            },
            "CallTagInfo": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "account_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "tag_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "tag_color": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "parent_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "available_for": {
                        "type": "integer"
                    },
                    "order_column": {
                        "type": "integer"
                    }
                },
                "required": [
                    "id",
                    "account_id",
                    "tag_name",
                    "tag_color",
                    "parent_id",
                    "available_for",
                    "order_column"
                ],
                "title": "CallTagInfo"
            },
            "CallTagInfoRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Tag group name",
                        "examples": [
                            "Sales"
                        ],
                        "maxLength": 20
                    },
                    "color": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Hex color code",
                        "pattern": "^#([a-f0-9]{6}|[a-f0-9]{3})$",
                        "examples": [
                            "#ff5733"
                        ]
                    },
                    "parent_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Parent tag group ID",
                        "examples": [
                            10
                        ]
                    },
                    "visible_to": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Visibility rules; omit to leave them unchanged, send an empty list or null to remove them",
                        "examples": [
                            [
                                {
                                    "type": 1,
                                    "allowed_id": 5
                                }
                            ]
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "type": {
                                    "type": "integer",
                                    "enum": [
                                        "1",
                                        "2"
                                    ]
                                },
                                "allowed_id": {
                                    "type": "integer"
                                }
                            },
                            "required": [
                                "type",
                                "allowed_id"
                            ]
                        },
                        "maxItems": 100
                    },
                    "available_for": {
                        "type": "integer",
                        "description": "Available for: 1-All, 2-Inbound, 3-Outbound Calls",
                        "enum": [
                            "1",
                            "2",
                            "3"
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "order_column": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Sort order",
                        "examples": [
                            3
                        ],
                        "minimum": 1,
                        "maximum": 4294967295
                    }
                },
                "required": [
                    "name",
                    "color"
                ],
                "title": "CallTagInfoRequest"
            },
            "CallTagInfoResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Computers"
                        ]
                    },
                    "color": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "#ffffff"
                        ]
                    },
                    "available_for": {
                        "type": "integer",
                        "description": "1-All, 2-Inbound, 3-Outbound @example 1"
                    },
                    "descendants_count": {
                        "examples": [
                            2
                        ],
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "integer",
                                "enum": [
                                    0
                                ]
                            }
                        ]
                    },
                    "descendants": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/CallTagInfoResource"
                        }
                    },
                    "visibility": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/CallTagVisibilityResource"
                        }
                    },
                    "order_column": {
                        "type": "integer",
                        "examples": [
                            3
                        ]
                    },
                    "parent_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            1
                        ]
                    }
                },
                "required": [
                    "id",
                    "name",
                    "color",
                    "available_for",
                    "descendants_count",
                    "order_column",
                    "parent_id"
                ],
                "title": "CallTagInfoResource"
            },
            "CallTagVisibilityResource": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "integer",
                        "description": "1- Extension, 2- Department @example 1"
                    },
                    "allowed_id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    }
                },
                "required": [
                    "type",
                    "allowed_id"
                ],
                "title": "CallTagVisibilityResource"
            },
            "ChangeAddonRequest": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string",
                        "description": "Data retention addon code (none, 3y, 7y, 10y)",
                        "enum": [
                            "none",
                            "3y",
                            "7y",
                            "10y"
                        ],
                        "examples": [
                            "3y"
                        ]
                    }
                },
                "required": [
                    "code"
                ],
                "title": "ChangeAddonRequest"
            },
            "ChangeExtSubscriptionRequest": {
                "type": "object",
                "properties": {
                    "subscription_id": {
                        "type": "integer",
                        "description": "Subscription ID",
                        "examples": [
                            1
                        ]
                    },
                    "extension_number": {
                        "type": "string",
                        "description": "Extension number",
                        "examples": [
                            100
                        ]
                    }
                },
                "required": [
                    "subscription_id",
                    "extension_number"
                ],
                "title": "ChangeExtSubscriptionRequest"
            },
            "ChangeReadStatusRequest": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": "string",
                        "description": "Read status (read or unread)",
                        "enum": [
                            "read",
                            "unread"
                        ],
                        "examples": [
                            "read"
                        ]
                    }
                },
                "required": [
                    "status"
                ],
                "title": "ChangeReadStatusRequest"
            },
            "ContactAddressResource": {
                "type": "object",
                "properties": {
                    "country": {
                        "type": "string"
                    },
                    "postcode": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "address_1": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "address_2": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "address_3": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "address_4": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "country",
                    "postcode",
                    "address_1",
                    "address_2",
                    "address_3",
                    "address_4"
                ],
                "title": "ContactAddressResource"
            },
            "ContactGroupRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Group Name",
                        "examples": [
                            "VIP Clients"
                        ],
                        "maxLength": 50
                    },
                    "hex_color": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Group Hex Color. See https://regex101.com/r/Te315V/1",
                        "pattern": "^#([a-f0-9]{6}|[a-f0-9]{3})$",
                        "examples": [
                            "#ff5733"
                        ]
                    },
                    "private": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Private Group",
                        "examples": [
                            true
                        ]
                    }
                },
                "required": [
                    "name"
                ],
                "title": "ContactGroupRequest"
            },
            "ContactGroupResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "hex_color": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "contacts_count": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "hex_color"
                ],
                "title": "ContactGroupResource"
            },
            "ContactImportResultResource": {
                "type": "object",
                "properties": {
                    "result": {
                        "type": "boolean",
                        "examples": [
                            true
                        ]
                    },
                    "isAsync": {
                        "type": "string",
                        "description": "True when the file was queued instead of imported in the request. @example false"
                    },
                    "importId": {
                        "type": "string",
                        "description": "Poll GET /v3/contacts/import/status/{importId} when isAsync. @example null"
                    },
                    "importedRows": {
                        "type": "string",
                        "description": "One entry per imported contact, each with a `numbers` list."
                    },
                    "ignoredRows": {
                        "type": "string",
                        "description": "Raw rows with no name, or no valid number in any mapped number column."
                    },
                    "invalidFields": {
                        "type": "string",
                        "description": "Dropped values as {field, columnIndex, value}, so the caller can point at the cell."
                    },
                    "totalImportedRows": {
                        "type": "string",
                        "examples": [
                            "1"
                        ]
                    },
                    "message": {
                        "type": "string"
                    }
                },
                "required": [
                    "result",
                    "isAsync",
                    "importId",
                    "importedRows",
                    "ignoredRows",
                    "invalidFields",
                    "totalImportedRows",
                    "message"
                ],
                "title": "ContactImportResultResource"
            },
            "ContactImportStatusResource": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "pending, processing, completed or failed. @example \"processing\""
                    },
                    "progress": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Percentage of staged rows processed. @example 40"
                    },
                    "totalRows": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "250"
                        ]
                    },
                    "totalImportedRows": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "248"
                        ]
                    },
                    "importedRows": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0,
                                "additionalItems": false
                            }
                        ]
                    },
                    "ignoredRows": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0,
                                "additionalItems": false
                            }
                        ]
                    },
                    "invalidFields": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0,
                                "additionalItems": false
                            }
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "2026-09-24T10:00:00+00:00"
                        ]
                    },
                    "error": {
                        "type": "string"
                    }
                },
                "required": [
                    "status",
                    "progress",
                    "totalRows",
                    "totalImportedRows",
                    "importedRows",
                    "ignoredRows",
                    "invalidFields",
                    "updated_at",
                    "error"
                ],
                "title": "ContactImportStatusResource"
            },
            "ContactIntegrationResource": {
                "type": "object",
                "properties": {
                    "integration_id": {
                        "type": "integer",
                        "examples": [
                            123
                        ]
                    },
                    "integration_name": {
                        "type": "string",
                        "examples": [
                            "Salesforce"
                        ]
                    },
                    "integration_account_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            "SF-001234"
                        ]
                    },
                    "external_id": {
                        "type": "string",
                        "examples": [
                            "abc-123"
                        ]
                    },
                    "external_portal_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            456
                        ]
                    },
                    "owner_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "789"
                        ]
                    },
                    "owner_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "John Doe"
                        ]
                    },
                    "company_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Acme Corp"
                        ]
                    },
                    "company_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "AC-999999"
                        ]
                    },
                    "contact_url": {
                        "type": "string",
                        "examples": [
                            "https://app.nuacom.com/v2/integrations/redirect-to-crm/123/abc-123"
                        ]
                    }
                },
                "required": [
                    "integration_id",
                    "integration_name",
                    "integration_account_id",
                    "external_id",
                    "external_portal_id",
                    "owner_id",
                    "owner_name",
                    "company_name",
                    "company_id",
                    "contact_url"
                ],
                "title": "ContactIntegrationResource"
            },
            "ContactOrganizationRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Company Name",
                        "examples": [
                            "Acme Corp"
                        ],
                        "maxLength": 50
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Company Phone",
                        "examples": [
                            "0035312345678"
                        ],
                        "maxLength": 16
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "description": "Company Email",
                        "examples": [
                            "info@acme.com"
                        ],
                        "maxLength": 70
                    },
                    "domain": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Company Domain",
                        "examples": [
                            "acme.com"
                        ],
                        "maxLength": 50
                    },
                    "address": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Company Address",
                        "examples": [
                            "123 Main Street"
                        ],
                        "maxLength": 50
                    },
                    "address_2": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Company Address line 2",
                        "examples": [
                            "Suite 4B"
                        ],
                        "maxLength": 100
                    },
                    "city": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Company City",
                        "examples": [
                            "Dublin"
                        ],
                        "maxLength": 30
                    },
                    "county": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Company County",
                        "examples": [
                            "Co. Dublin"
                        ],
                        "maxLength": 30
                    },
                    "post_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Company PO Box",
                        "examples": [
                            "D01 F5P2"
                        ],
                        "maxLength": 30
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Company Country",
                        "examples": [
                            "Ireland"
                        ],
                        "maxLength": 30
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Company Notes",
                        "examples": [
                            "Key enterprise client"
                        ],
                        "maxLength": 500
                    }
                },
                "required": [
                    "name"
                ],
                "title": "ContactOrganizationRequest"
            },
            "ContactOrganizationResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "domain": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "address": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "city": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "county": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "post_code": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "contacts_count": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "phone",
                    "email",
                    "domain",
                    "address",
                    "city",
                    "county",
                    "post_code",
                    "country",
                    "notes",
                    "updated_at"
                ],
                "title": "ContactOrganizationResource"
            },
            "ContactPhoneBookResource": {
                "type": "object",
                "properties": {
                    "contact_comments": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "email_optout": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "contact_dob": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "facebook_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "mailchimp_sync": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "reference": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "owner_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "document_expire_date": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "contact_source": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "contact_comments",
                    "email_optout",
                    "contact_dob",
                    "facebook_id",
                    "mailchimp_sync",
                    "reference",
                    "email",
                    "owner_id",
                    "document_expire_date",
                    "contact_source"
                ],
                "title": "ContactPhoneBookResource"
            },
            "ContactPhoneResource": {
                "type": "object",
                "properties": {
                    "phone_number": {
                        "type": "integer"
                    },
                    "number_type": {
                        "type": "integer"
                    },
                    "number_type_text": {
                        "type": "string"
                    },
                    "sms_support": {
                        "type": "boolean"
                    },
                    "sms_history": {
                        "type": "boolean"
                    },
                    "sms_blocked": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "phone_number",
                    "number_type",
                    "number_type_text",
                    "sms_support",
                    "sms_history",
                    "sms_blocked"
                ],
                "title": "ContactPhoneResource"
            },
            "ContactRequest": {
                "type": "object",
                "properties": {
                    "phones": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Phones; required unless an email is given",
                        "examples": [
                            [
                                "+353123456789"
                            ]
                        ],
                        "items": {
                            "type": "string",
                            "maxLength": 20
                        },
                        "maxItems": 5
                    },
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "First Name",
                        "examples": [
                            "John"
                        ],
                        "maxLength": 100
                    },
                    "last_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Last Name",
                        "examples": [
                            "Doe"
                        ],
                        "maxLength": 100
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "description": "Email; required unless at least one phone is given",
                        "examples": [
                            "john@example.com"
                        ],
                        "maxLength": 50
                    },
                    "address_1": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Address 1",
                        "examples": [
                            "123 Main Street"
                        ],
                        "maxLength": 100
                    },
                    "address_2": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Address 2",
                        "examples": [
                            "Apt 4"
                        ],
                        "maxLength": 100
                    },
                    "address_3": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Address 3",
                        "examples": [
                            "Dublin"
                        ],
                        "maxLength": 100
                    },
                    "address_4": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Address 4",
                        "examples": [
                            "Co. Dublin"
                        ],
                        "maxLength": 100
                    },
                    "post_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Post Code",
                        "examples": [
                            "D01 F5P2"
                        ],
                        "maxLength": 10
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Alpha 2 chars ISO Country Code",
                        "examples": [
                            "IE"
                        ]
                    },
                    "comments": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Comments",
                        "examples": [
                            "Important client"
                        ],
                        "maxLength": 500
                    },
                    "birthdate": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Birth date",
                        "examples": [
                            "1990-01-15"
                        ]
                    },
                    "private": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Private Contact?",
                        "examples": [
                            false
                        ]
                    },
                    "groups": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Groups",
                        "examples": [
                            [
                                1,
                                2
                            ]
                        ],
                        "items": {
                            "type": "integer"
                        }
                    },
                    "organizations": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Organizations",
                        "items": {
                            "type": "integer"
                        }
                    }
                },
                "title": "ContactRequest"
            },
            "ContactResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "name": {
                        "type": "string"
                    },
                    "phones": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ContactPhoneResource"
                        }
                    },
                    "phonebook": {
                        "$ref": "#/components/schemas/ContactPhoneBookResource"
                    },
                    "address": {
                        "$ref": "#/components/schemas/ContactAddressResource"
                    },
                    "groups": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ContactGroupResource"
                        }
                    },
                    "organization": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ContactOrganizationResource"
                        }
                    },
                    "visibility": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "first_name",
                    "last_name",
                    "name",
                    "visibility",
                    "updated_at",
                    "created_at",
                    "deleted_at"
                ],
                "title": "ContactResource"
            },
            "ContactVisibility": {
                "type": "string",
                "description": "The phonebook list's filter[visibility]. A contact is private when its phonebook row carries an owner_id.\n| |\n|---|\n| `all` <br/> Shared contacts plus the current user's own private ones \u2014 the list default. |\n| `public` <br/> Shared contacts only. |\n| `private` <br/> The current user's own private contacts only. |",
                "enum": [
                    "all",
                    "public",
                    "private"
                ],
                "title": "ContactVisibility"
            },
            "ConversationResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "examples": [
                            "conv_xyz789"
                        ]
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "ext_123"
                        ]
                    },
                    "channel_type": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Support Chat"
                        ]
                    },
                    "is_group": {
                        "type": "boolean",
                        "examples": [
                            false
                        ]
                    },
                    "owner_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            42
                        ]
                    },
                    "assigned_to_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            10
                        ]
                    },
                    "assigned_department_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            5
                        ]
                    },
                    "last_message_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:30:00+00:00"
                        ]
                    },
                    "last_read_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:25:00+00:00"
                        ]
                    },
                    "is_pinned": {
                        "type": "boolean",
                        "examples": [
                            false
                        ]
                    },
                    "account_id": {
                        "type": "string",
                        "examples": [
                            "IE-12345"
                        ]
                    },
                    "is_active": {
                        "type": "boolean",
                        "examples": [
                            true
                        ]
                    },
                    "sender_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "NUACOM"
                        ]
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "Time-to-respond deadline. Set when an inbound message arrives on\na number with a configured TTR rule; cleared when the next\noutbound reply is sent.",
                        "examples": [
                            "2024-02-15T10:30:00+00:00"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:00:00+00:00"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:30:00+00:00"
                        ]
                    },
                    "participants": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ParticipantResource"
                        }
                    },
                    "messages": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/MessageResource"
                        }
                    },
                    "channels": {
                        "description": "Distinct channel types observed across this conversation's non-draft messages.\nPopulated only on the show endpoint; defaults to an empty list elsewhere.",
                        "examples": [
                            [
                                1,
                                2
                            ]
                        ],
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0,
                                "additionalItems": false
                            }
                        ]
                    },
                    "unread_count": {
                        "examples": [
                            3
                        ],
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "integer",
                                "enum": [
                                    0
                                ]
                            }
                        ]
                    }
                },
                "required": [
                    "id",
                    "external_id",
                    "channel_type",
                    "title",
                    "is_group",
                    "owner_id",
                    "assigned_to_id",
                    "assigned_department_id",
                    "last_message_at",
                    "last_read_at",
                    "is_pinned",
                    "account_id",
                    "is_active",
                    "sender_id",
                    "expires_at",
                    "created_at",
                    "updated_at",
                    "channels",
                    "unread_count"
                ],
                "title": "ConversationResource"
            },
            "CreateConversationRequest": {
                "type": "object",
                "properties": {
                    "channel_type": {
                        "type": "string",
                        "description": "Channel type (SMS, WhatsApp, etc.)",
                        "enum": [
                            "1",
                            "2",
                            "3"
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Conversation title",
                        "examples": [
                            "Support chat"
                        ],
                        "maxLength": 255
                    },
                    "is_group": {
                        "type": "boolean",
                        "description": "Whether this is a group conversation",
                        "examples": [
                            false
                        ]
                    },
                    "assigned_to_id": {
                        "type": "string",
                        "description": "User ID to assign the conversation to",
                        "examples": [
                            123
                        ]
                    },
                    "assigned_department_id": {
                        "type": "integer",
                        "description": "Department ID to assign the conversation to",
                        "examples": [
                            5
                        ]
                    },
                    "participants": {
                        "type": "array",
                        "description": "Support both participants array format and bulk SMS format",
                        "examples": [
                            [
                                {
                                    "participant_type": "phone",
                                    "participant_id": "+353861234567"
                                }
                            ]
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "participant_type": {
                                    "type": "string",
                                    "enum": [
                                        "user",
                                        "contact",
                                        "phone_number",
                                        "email"
                                    ]
                                },
                                "participant_id": {
                                    "type": "string"
                                },
                                "display_name": {
                                    "type": "string",
                                    "maxLength": 255
                                },
                                "is_system_user": {
                                    "type": "boolean"
                                }
                            }
                        },
                        "minItems": 1
                    },
                    "contacts": {
                        "type": "string",
                        "description": "Comma-separated phone numbers for bulk SMS",
                        "examples": [
                            "+353861234567,+353861234568"
                        ]
                    },
                    "groups": {
                        "type": "string",
                        "description": "Comma-separated phone numbers",
                        "examples": [
                            "1,2,3"
                        ]
                    },
                    "message_contacts": {
                        "type": "string",
                        "description": "Comma-separated group IDs",
                        "examples": [
                            "msg_123"
                        ]
                    },
                    "send_to_opted_in": {
                        "type": "boolean",
                        "description": "Previous message contacts ID",
                        "examples": [
                            false
                        ]
                    },
                    "opt_in": {
                        "type": "boolean",
                        "description": "Send only to opted-in numbers",
                        "examples": [
                            false
                        ]
                    },
                    "opt_in_message": {
                        "type": "string",
                        "description": "Include opt-in message",
                        "examples": [
                            "Reply YES to subscribe"
                        ],
                        "maxLength": 150
                    },
                    "opt_out": {
                        "type": "boolean",
                        "description": "Include opt-out message",
                        "examples": [
                            true
                        ]
                    },
                    "opt_out_message": {
                        "type": "string",
                        "description": "Include opt-out message",
                        "examples": [
                            "Reply STOP to unsubscribe"
                        ],
                        "maxLength": 150
                    },
                    "landline_params": {
                        "type": "object",
                        "description": "Landline sniffer parameters",
                        "examples": [
                            {
                                "ll_sniff": false
                            }
                        ],
                        "properties": {
                            "ll_sniff": {
                                "type": "boolean"
                            },
                            "ll_sniff_from": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "ll_sniff_to": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "ll_last_activity": {
                                "type": "integer"
                            },
                            "ll_visits_times": {
                                "type": "integer"
                            },
                            "ll_visits_operation": {
                                "type": "string",
                                "enum": [
                                    ">",
                                    "<",
                                    "="
                                ]
                            }
                        }
                    },
                    "message": {
                        "type": "object",
                        "description": "Message content and metadata",
                        "examples": [
                            {
                                "content": "Hello!",
                                "metadata": []
                            }
                        ],
                        "properties": {
                            "content": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "content_url": {
                                "type": "string",
                                "format": "uri"
                            },
                            "content_file": {
                                "type": "string",
                                "format": "binary",
                                "contentMediaType": "application/octet-stream",
                                "description": "Maximum file size: 16384 kilobytes."
                            },
                            "message_type": {
                                "type": "integer",
                                "enum": [
                                    "0",
                                    "1",
                                    "2",
                                    "3",
                                    "5",
                                    "6",
                                    "7",
                                    "8",
                                    "9",
                                    "10",
                                    "11",
                                    "12",
                                    "13"
                                ]
                            },
                            "metadata": {
                                "type": "object",
                                "properties": {
                                    "template_id": {
                                        "type": "string"
                                    },
                                    "template_variables": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "scheduled_for": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "media_ids": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "format": "uuid"
                                },
                                "maxItems": 10
                            }
                        }
                    },
                    "sender_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "SMS sender name or number",
                        "examples": [
                            "+353212345678"
                        ]
                    }
                },
                "required": [
                    "channel_type"
                ],
                "title": "CreateConversationRequest"
            },
            "CustomHoliday": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "account_code": {
                        "type": "string"
                    },
                    "menu_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "from_time": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "to_time": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "first_action": {
                        "type": "integer"
                    },
                    "first_action_data": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "second_action": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "second_action_data": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "menu_time_zone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "account_code",
                    "menu_id",
                    "from_time",
                    "to_time",
                    "first_action",
                    "first_action_data",
                    "second_action",
                    "second_action_data",
                    "menu_time_zone"
                ],
                "title": "CustomHoliday"
            },
            "CustomHolidaySettingsCollection": {
                "type": "object",
                "properties": {
                    "holidays": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/CustomHoliday"
                        }
                    },
                    "ivrs": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/AccountInfoMenuOption"
                        }
                    }
                },
                "required": [
                    "holidays",
                    "ivrs"
                ],
                "title": "CustomHolidaySettingsCollection"
            },
            "CustomHolidaySettingsUpdateRequest": {
                "type": "array",
                "description": "Array of custom holiday rules to update.\n\nEach item supports:",
                "items": {
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "menu_id": {
                            "type": "string"
                        },
                        "from_time": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "to_time": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "first_action": {
                            "type": "integer"
                        },
                        "first_action_data": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "second_action": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        },
                        "second_action_data": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "menu_time_zone": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "menu_id",
                        "from_time",
                        "to_time",
                        "first_action",
                        "menu_time_zone"
                    ]
                },
                "title": "CustomHolidaySettingsUpdateRequest"
            },
            "DepartmentResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "examples": [
                            "1"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Sales"
                        ]
                    },
                    "users": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "users"
                ],
                "title": "DepartmentResource"
            },
            "DepartmentStoreRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Department name (max 20 chars)",
                        "examples": [
                            "Sales"
                        ],
                        "maxLength": 20
                    }
                },
                "required": [
                    "name"
                ],
                "title": "DepartmentStoreRequest"
            },
            "DowngradeAiSttRequest": {
                "type": "object",
                "properties": {
                    "addon_id": {
                        "type": "string",
                        "description": "The ID of the addon to downgrade to",
                        "examples": [
                            1124
                        ]
                    }
                },
                "required": [
                    "addon_id"
                ],
                "title": "DowngradeAiSttRequest"
            },
            "ExtensionsAvailableCliResource": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "examples": [
                            "Test Number"
                        ]
                    },
                    "number": {
                        "type": "string",
                        "examples": [
                            "003531234568"
                        ]
                    },
                    "int_number": {
                        "type": "integer",
                        "examples": [
                            3531234568
                        ]
                    }
                },
                "required": [
                    "name",
                    "number",
                    "int_number"
                ],
                "title": "ExtensionsAvailableCliResource"
            },
            "ExtensionsListResource": {
                "type": "object",
                "properties": {
                    "number": {
                        "type": "integer",
                        "examples": [
                            10
                        ]
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "John Doe"
                        ]
                    },
                    "extension_is_used": {
                        "type": "integer",
                        "enum": [
                            1,
                            0
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "subscription": {
                        "type": "string",
                        "examples": [
                            "Essentials"
                        ]
                    }
                },
                "required": [
                    "number",
                    "name",
                    "extension_is_used",
                    "subscription"
                ],
                "title": "ExtensionsListResource"
            },
            "FaxCdrResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "direction": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "email": {
                        "type": "string",
                        "examples": [
                            "test@email.com"
                        ]
                    },
                    "sender": {
                        "type": "integer",
                        "examples": [
                            112298765432
                        ]
                    },
                    "destination": {
                        "type": "integer",
                        "examples": [
                            112298765432
                        ]
                    },
                    "send_timestamp": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-02-22T08:51:11+00:00"
                        ]
                    },
                    "status": {
                        "type": "integer",
                        "enum": [
                            4,
                            5,
                            3,
                            2,
                            1
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "status_timestamp": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-02-22T08:51:11+00:00"
                        ]
                    }
                },
                "required": [
                    "id",
                    "direction",
                    "email",
                    "sender",
                    "destination",
                    "send_timestamp",
                    "status",
                    "status_timestamp"
                ],
                "title": "FaxCdrResource"
            },
            "FaxNumberResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "112298765432"
                        ]
                    },
                    "localized_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "01 234 5678"
                        ]
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Fax 1"
                        ]
                    },
                    "inbound_emails": {
                        "type": "string",
                        "examples": [
                            [
                                "test1@email.com"
                            ]
                        ]
                    },
                    "outbound_emails": {
                        "type": "string",
                        "examples": [
                            [
                                "test2@email.com"
                            ]
                        ]
                    }
                },
                "required": [
                    "id",
                    "number",
                    "localized_number",
                    "name",
                    "inbound_emails",
                    "outbound_emails"
                ],
                "title": "FaxNumberResource"
            },
            "FaxQueueResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "direction": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "test@email.com"
                        ]
                    },
                    "sender": {
                        "type": "integer",
                        "examples": [
                            112298765432
                        ]
                    },
                    "destination": {
                        "type": "integer",
                        "examples": [
                            112298765432
                        ]
                    },
                    "timestamp": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-02-22T08:51:11+00:00"
                        ]
                    }
                },
                "required": [
                    "id",
                    "direction",
                    "email",
                    "sender",
                    "destination",
                    "timestamp"
                ],
                "title": "FaxQueueResource"
            },
            "GetHighlightedCallSTTRequest": {
                "type": "object",
                "properties": {
                    "search": {
                        "type": "string",
                        "description": "Search query",
                        "examples": [
                            "Fridge"
                        ]
                    }
                },
                "required": [
                    "search"
                ],
                "title": "GetHighlightedCallSTTRequest"
            },
            "ImportContactsData": {
                "type": "object",
                "description": "Multipart input of the v3 contacts import.\n\nSnake_case property names mirror the multipart field names the portal sends, matching the v2\nimporter this replaces so the frontend changes which fields it maps, not how it names them.",
                "properties": {
                    "contacts_list": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application/octet-stream"
                    },
                    "group_ids": {
                        "type": "array",
                        "default": [],
                        "items": {
                            "type": "integer"
                        }
                    },
                    "phone_indexes": {
                        "type": "array",
                        "default": [],
                        "items": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "maxItems": 5
                    },
                    "private_user_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "first_name_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "last_name_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "email_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "dob_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "comment_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "address1_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "address2_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "address3_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "address4_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "post_code_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    }
                },
                "required": [
                    "contacts_list"
                ],
                "title": "ImportContactsData"
            },
            "ImportPhonebooksRequest": {
                "type": "object",
                "properties": {
                    "contacts_list": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application/octet-stream",
                        "description": "CSV, XLS, or XLSX file with contacts"
                    },
                    "group_ids": {
                        "type": "array",
                        "description": "Contact group IDs. The legacy single `group_id` is still accepted",
                        "examples": [
                            [
                                42,
                                43
                            ]
                        ],
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1
                    },
                    "private_user_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Private user ID",
                        "examples": [
                            5
                        ]
                    },
                    "first_name_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Column index for first name",
                        "examples": [
                            0
                        ]
                    },
                    "last_name_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Column index for last name",
                        "examples": [
                            1
                        ]
                    },
                    "mobile_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Column index for mobile number",
                        "examples": [
                            2
                        ]
                    },
                    "landline_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Column index for landline number",
                        "examples": [
                            3
                        ]
                    },
                    "email_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Column index for email",
                        "examples": [
                            4
                        ]
                    },
                    "dob_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Column index for date of birth",
                        "examples": [
                            5
                        ]
                    },
                    "comment_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Column index for comment",
                        "examples": [
                            6
                        ]
                    },
                    "address1_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Column index for address line 1",
                        "examples": [
                            7
                        ]
                    },
                    "address2_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Column index for address line 2",
                        "examples": [
                            8
                        ]
                    },
                    "address3_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Column index for address line 3",
                        "examples": [
                            9
                        ]
                    },
                    "address4_index": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Column index for address line 4",
                        "examples": [
                            10
                        ]
                    }
                },
                "required": [
                    "contacts_list",
                    "group_ids"
                ],
                "title": "ImportPhonebooksRequest"
            },
            "IntegrationContactResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "First Name @example \"Test\""
                    },
                    "last_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Last Name @example \"Test\""
                    },
                    "name": {
                        "type": "string",
                        "description": "Full Name @example \"Test User\""
                    },
                    "phones": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/App.Http.Resources.Api.V3.ContactPhoneResource"
                        }
                    },
                    "integration": {
                        "$ref": "#/components/schemas/ContactIntegrationResource"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2023-01-01T00:00:00Z"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2023-01-01T00:00:00Z"
                        ]
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            null
                        ]
                    }
                },
                "required": [
                    "id",
                    "first_name",
                    "last_name",
                    "name",
                    "updated_at",
                    "created_at",
                    "deleted_at"
                ],
                "title": "IntegrationContactResource"
            },
            "IvrMenuUpdateRequest": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 127
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Menu name",
                        "examples": [
                            "Main Call Flow"
                        ],
                        "maxLength": 100
                    },
                    "data": {
                        "type": "object",
                        "description": "Menu configuration",
                        "examples": [
                            {
                                "options_msg_enabled": true,
                                "open": {
                                    "pause": 8
                                }
                            }
                        ],
                        "properties": {
                            "options_msg_enabled": {
                                "type": "boolean"
                            },
                            "initial": {
                                "type": "object",
                                "properties": {
                                    "ring_duration": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 30
                                    },
                                    "message": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 10,
                                        "maximum": 99
                                    }
                                },
                                "required": [
                                    "ring_duration"
                                ]
                            },
                            "open": {
                                "type": "object",
                                "properties": {
                                    "message": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 10,
                                        "maximum": 99
                                    },
                                    "pause": {
                                        "type": "number"
                                    },
                                    "actions": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "action_1": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "value": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ],
                                                            "maxLength": 50
                                                        }
                                                    },
                                                    "required": [
                                                        "id"
                                                    ]
                                                },
                                                "action_2": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "value": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ],
                                                            "maxLength": 50
                                                        }
                                                    }
                                                }
                                            }
                                        },
                                        "minItems": 10,
                                        "maxItems": 10
                                    },
                                    "fall_through": {
                                        "type": "object",
                                        "properties": {
                                            "action_1": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "value": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "maxLength": 50
                                                    }
                                                },
                                                "required": [
                                                    "id"
                                                ]
                                            },
                                            "action_2": {
                                                "type": [
                                                    "object",
                                                    "null"
                                                ],
                                                "properties": {
                                                    "id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "value": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "maxLength": 50
                                                    }
                                                }
                                            }
                                        },
                                        "required": [
                                            "action_1"
                                        ]
                                    }
                                },
                                "required": [
                                    "pause",
                                    "fall_through"
                                ]
                            },
                            "close": {
                                "type": "object",
                                "properties": {
                                    "actions": {
                                        "type": "object",
                                        "properties": {
                                            "action_1": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "value": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "maxLength": 50
                                                    }
                                                },
                                                "required": [
                                                    "id"
                                                ]
                                            },
                                            "action_2": {
                                                "type": [
                                                    "object",
                                                    "null"
                                                ],
                                                "properties": {
                                                    "id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "value": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "maxLength": 50
                                                    }
                                                }
                                            }
                                        },
                                        "required": [
                                            "action_1"
                                        ]
                                    }
                                },
                                "required": [
                                    "actions"
                                ]
                            }
                        },
                        "required": [
                            "options_msg_enabled",
                            "initial",
                            "open",
                            "close"
                        ]
                    }
                },
                "required": [
                    "id",
                    "data"
                ],
                "title": "IvrMenuUpdateRequest"
            },
            "KeywordTrackerResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "tracker_name": {
                        "type": "string",
                        "examples": [
                            "My Tracker"
                        ]
                    },
                    "account_id": {
                        "type": "string",
                        "examples": [
                            "123"
                        ]
                    },
                    "keywords": {
                        "type": "string",
                        "examples": [
                            "key1, key2"
                        ]
                    },
                    "is_active": {
                        "type": "boolean",
                        "examples": [
                            true
                        ]
                    },
                    "filters": {
                        "type": "array",
                        "items": {}
                    },
                    "email_alerts": {
                        "type": "array",
                        "items": {}
                    },
                    "tag_ids": {
                        "type": "array",
                        "items": {}
                    }
                },
                "required": [
                    "id",
                    "tracker_name",
                    "account_id",
                    "keywords",
                    "is_active"
                ],
                "title": "KeywordTrackerResource"
            },
            "LanguageOptionResource": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string",
                        "examples": [
                            "en"
                        ]
                    },
                    "label": {
                        "type": "string",
                        "examples": [
                            "English"
                        ]
                    }
                },
                "required": [
                    "code",
                    "label"
                ],
                "title": "LanguageOptionResource"
            },
            "MarkedMobileNumberRequest": {
                "type": "object",
                "properties": {
                    "mobile_number": {
                        "type": "string",
                        "description": "Mobile number to mark",
                        "examples": [
                            "0050374439010"
                        ],
                        "minLength": 9,
                        "maxLength": 20
                    },
                    "status": {
                        "type": "integer",
                        "description": "Marked status type",
                        "enum": [
                            "2",
                            "3",
                            "4"
                        ],
                        "examples": [
                            2
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Notes about the marked number",
                        "examples": [
                            "Blocked for spam"
                        ],
                        "maxLength": 50
                    }
                },
                "required": [
                    "mobile_number",
                    "status"
                ],
                "title": "MarkedMobileNumberRequest"
            },
            "MarkedMobileNumberResource": {
                "type": "object",
                "properties": {
                    "mobile_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "+353871234567"
                        ]
                    },
                    "status": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "examples": [
                                    2
                                ]
                            },
                            "value": {
                                "type": "string",
                                "examples": [
                                    "Manually Blocked"
                                ]
                            }
                        },
                        "required": [
                            "id",
                            "value"
                        ]
                    },
                    "entrydate": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2020-06-15T10:37:51+00:00"
                        ]
                    },
                    "notes": {
                        "type": "string",
                        "examples": [
                            "User requested blocking"
                        ]
                    },
                    "formatted_mobile_number": {
                        "type": "string",
                        "examples": [
                            "0871234567"
                        ]
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "John Doe"
                        ]
                    }
                },
                "required": [
                    "mobile_number",
                    "status",
                    "entrydate",
                    "notes",
                    "formatted_mobile_number",
                    "name"
                ],
                "title": "MarkedMobileNumberResource"
            },
            "MessageResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "examples": [
                            "msg_abc123"
                        ]
                    },
                    "conversation_id": {
                        "type": "string",
                        "examples": [
                            "conv_xyz789"
                        ]
                    },
                    "channel_type": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "sender_participant_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "1"
                        ]
                    },
                    "content": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Hello, how can I help you?"
                        ]
                    },
                    "content_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "https://example.com/file.pdf"
                        ]
                    },
                    "thumbnail_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "https://s3.example.com/IE-00491/wa_thumbnail_....jpg"
                        ]
                    },
                    "message_type": {
                        "type": "integer",
                        "examples": [
                            0
                        ]
                    },
                    "direction": {
                        "type": "integer",
                        "examples": [
                            "inbound"
                        ]
                    },
                    "is_draft": {
                        "type": "boolean",
                        "examples": [
                            false
                        ]
                    },
                    "submitted_by_user_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            42
                        ]
                    },
                    "submitted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:30:00+00:00"
                        ]
                    },
                    "delivered_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:30:05+00:00"
                        ]
                    },
                    "read_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:31:00+00:00"
                        ]
                    },
                    "edited_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:35:00+00:00"
                        ]
                    },
                    "reference_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "ref_123456"
                        ]
                    },
                    "scheduled_for": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "2024-01-16T09:00:00+00:00"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:30:00+00:00"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:30:00+00:00"
                        ]
                    },
                    "status": {
                        "type": "integer",
                        "examples": [
                            "delivered"
                        ]
                    },
                    "metadata": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "examples": [
                            {
                                "template_id": "tpl_123",
                                "media": {
                                    "mime_type": "image/jpeg",
                                    "media_type": "image",
                                    "file_size": 102400,
                                    "filename": "photo.jpg"
                                },
                                "media_error": {
                                    "code": "MEDIA_TOO_LARGE",
                                    "message": "Media file size exceeds the 16 MB limit. File size: 20 MB."
                                }
                            }
                        ],
                        "additionalProperties": {}
                    },
                    "attachments": {
                        "description": "All media attachments on the message, in send order. Single for WhatsApp,\nup to 10 for MMS. Empty when the message has no media.",
                        "examples": [
                            [
                                {
                                    "id": "3facde2c-...",
                                    "content_url": "https://...",
                                    "thumbnail_url": "https://...",
                                    "blur_hash": "LEHV6nWB...",
                                    "media_type": "image",
                                    "mime_type": "image/jpeg",
                                    "file_size": 102400,
                                    "filename": "photo.jpg"
                                }
                            ]
                        ],
                        "anyOf": [
                            {
                                "type": "array",
                                "prefixItems": [
                                    {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "content_url": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            },
                                            "thumbnail_url": {
                                                "type": "string"
                                            },
                                            "media_type": {
                                                "type": "string"
                                            },
                                            "mime_type": {
                                                "type": "string"
                                            },
                                            "file_size": {
                                                "type": "string"
                                            },
                                            "filename": {
                                                "type": "string"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "content_url",
                                            "thumbnail_url",
                                            "media_type",
                                            "mime_type",
                                            "file_size",
                                            "filename"
                                        ]
                                    }
                                ],
                                "minItems": 1,
                                "maxItems": 1,
                                "additionalItems": false
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "content_url": {
                                            "type": "string"
                                        },
                                        "thumbnail_url": {
                                            "type": "null"
                                        },
                                        "media_type": {
                                            "type": "string"
                                        },
                                        "mime_type": {
                                            "type": "string"
                                        },
                                        "file_size": {
                                            "type": "integer"
                                        },
                                        "filename": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "content_url",
                                        "thumbnail_url",
                                        "media_type",
                                        "mime_type",
                                        "file_size",
                                        "filename"
                                    ]
                                }
                            }
                        ]
                    },
                    "sender": {
                        "$ref": "#/components/schemas/ParticipantResource"
                    },
                    "statuses": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/MessageStatusResource"
                        }
                    }
                },
                "required": [
                    "id",
                    "conversation_id",
                    "channel_type",
                    "sender_participant_id",
                    "content",
                    "content_url",
                    "thumbnail_url",
                    "message_type",
                    "direction",
                    "is_draft",
                    "submitted_by_user_id",
                    "submitted_at",
                    "delivered_at",
                    "read_at",
                    "edited_at",
                    "reference_id",
                    "created_at",
                    "updated_at",
                    "status",
                    "metadata",
                    "attachments"
                ],
                "title": "MessageResource"
            },
            "MessageStatusResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "examples": [
                            "1"
                        ]
                    },
                    "message_id": {
                        "type": "string",
                        "examples": [
                            "msg_abc123"
                        ]
                    },
                    "participant_id": {
                        "type": "string",
                        "examples": [
                            "1"
                        ]
                    },
                    "status": {
                        "type": "integer",
                        "examples": [
                            "delivered"
                        ]
                    },
                    "error_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "ERR001"
                        ]
                    },
                    "error_description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Message delivery failed"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:30:00+00:00"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:30:00+00:00"
                        ]
                    }
                },
                "required": [
                    "id",
                    "message_id",
                    "participant_id",
                    "status",
                    "error_code",
                    "error_description",
                    "created_at",
                    "updated_at"
                ],
                "title": "MessageStatusResource"
            },
            "MessagingRateResource": {
                "type": "object",
                "properties": {
                    "channel": {
                        "type": "string",
                        "examples": [
                            "1"
                        ]
                    },
                    "country_name": {
                        "type": "string",
                        "examples": [
                            "Ireland"
                        ]
                    },
                    "price": {
                        "type": "string",
                        "examples": [
                            "0.05"
                        ]
                    },
                    "wa_message_type": {
                        "type": "string",
                        "description": "WhatsApp message type (1=Authentication, 2=Marketing, 3=Utility, 99=CSW Open)",
                        "examples": [
                            "2"
                        ]
                    }
                },
                "required": [
                    "channel",
                    "country_name",
                    "price",
                    "wa_message_type"
                ],
                "title": "MessagingRateResource"
            },
            "MissedCallFollowupSettingRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "maxLength": 2000
                    },
                    "report_id": {
                        "type": "integer",
                        "enum": [
                            "34",
                            "340"
                        ]
                    },
                    "period": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "daily",
                            "weekly",
                            "monthly",
                            null
                        ]
                    },
                    "hour": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "pattern": "^([01]?[0-9]|2[0-3]):00$"
                    },
                    "timezone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "email",
                    "report_id"
                ],
                "title": "MissedCallFollowupSettingRequest"
            },
            "MmsMediaModerationStatusResource": {
                "type": "object",
                "properties": {
                    "media_id": {
                        "type": "string",
                        "examples": [
                            "9d1f0f9c-0b7a-4b1e-9a2e-0f4f2f7a1c3d"
                        ]
                    },
                    "type": {
                        "type": "string",
                        "examples": [
                            "image"
                        ]
                    },
                    "moderation_status": {
                        "type": "string",
                        "examples": [
                            "approved"
                        ]
                    },
                    "is_approved": {
                        "type": "boolean",
                        "examples": [
                            true
                        ]
                    }
                },
                "required": [
                    "media_id",
                    "type",
                    "moderation_status",
                    "is_approved"
                ],
                "title": "MmsMediaModerationStatusResource"
            },
            "NewSmsSenderNameRequest": {
                "type": "object",
                "properties": {
                    "sender_name": {
                        "type": "string",
                        "description": "The sender name (3-11 characters, unique)",
                        "examples": [
                            "NUACOM"
                        ],
                        "minLength": 3,
                        "maxLength": 11
                    },
                    "is_ireland_sender": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Boolean to identify Ireland sender names",
                        "examples": [
                            true
                        ]
                    },
                    "org_type": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The organization type",
                        "enum": [
                            "company",
                            "charity",
                            "club",
                            "state_body",
                            "health_professional",
                            "partnership_sole_trader",
                            null
                        ],
                        "examples": [
                            "company"
                        ]
                    }
                },
                "required": [
                    "sender_name"
                ],
                "title": "NewSmsSenderNameRequest"
            },
            "NumberBlockingResource": {
                "type": "object",
                "properties": {
                    "entry_id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "phone_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "+353861234567"
                        ]
                    },
                    "inbound": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "examples": [
                            true
                        ]
                    },
                    "outbound": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "examples": [
                            false
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Spam caller"
                        ]
                    }
                },
                "required": [
                    "entry_id",
                    "phone_number",
                    "inbound",
                    "outbound",
                    "notes"
                ],
                "title": "NumberBlockingResource"
            },
            "NumberBlockingStoreRequest": {
                "type": "object",
                "properties": {
                    "phone_number": {
                        "type": "string",
                        "description": "Phone number to block",
                        "examples": [
                            "+353861234567"
                        ],
                        "maxLength": 20
                    },
                    "inbound": {
                        "type": "boolean",
                        "description": "Block inbound calls",
                        "examples": [
                            true
                        ]
                    },
                    "outbound": {
                        "type": "boolean",
                        "description": "Block outbound calls",
                        "examples": [
                            false
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optional notes",
                        "examples": [
                            "Spam caller"
                        ]
                    }
                },
                "required": [
                    "phone_number"
                ],
                "title": "NumberBlockingStoreRequest"
            },
            "NumberBlockingUpdateRequest": {
                "type": "object",
                "properties": {
                    "phone_number": {
                        "type": "string",
                        "description": "Phone number to block",
                        "examples": [
                            "+353861234567"
                        ],
                        "maxLength": 20
                    },
                    "inbound": {
                        "type": "boolean",
                        "description": "Block inbound calls",
                        "examples": [
                            true
                        ]
                    },
                    "outbound": {
                        "type": "boolean",
                        "description": "Block outbound calls",
                        "examples": [
                            false
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optional notes",
                        "examples": [
                            "Spam caller"
                        ]
                    }
                },
                "required": [
                    "phone_number"
                ],
                "title": "NumberBlockingUpdateRequest"
            },
            "NumberLanguageOverrideResource": {
                "type": "object",
                "properties": {
                    "in_ext": {
                        "type": "string"
                    },
                    "languages": {
                        "type": "array",
                        "items": {}
                    }
                },
                "required": [
                    "in_ext",
                    "languages"
                ],
                "title": "NumberLanguageOverrideResource"
            },
            "ParticipantResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "examples": [
                            "1"
                        ]
                    },
                    "conversation_id": {
                        "type": "string",
                        "examples": [
                            "conv_xyz789"
                        ]
                    },
                    "participant_type": {
                        "type": "string",
                        "examples": [
                            "user"
                        ]
                    },
                    "participant_id": {
                        "type": "string",
                        "examples": [
                            "usr_123"
                        ]
                    },
                    "display_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "John Doe"
                        ]
                    },
                    "is_system_user": {
                        "type": "boolean",
                        "examples": [
                            false
                        ]
                    },
                    "last_read_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:30:00+00:00"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:00:00+00:00"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2024-01-15T10:30:00+00:00"
                        ]
                    }
                },
                "required": [
                    "id",
                    "conversation_id",
                    "participant_type",
                    "participant_id",
                    "display_name",
                    "is_system_user",
                    "last_read_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "ParticipantResource"
            },
            "PasswordRequirementsResource": {
                "type": "object",
                "properties": {
                    "password_min_length": {
                        "type": "object",
                        "description": "Minimum password length",
                        "examples": [
                            {
                                "value": 12,
                                "text": "The password must be at least 12 characters."
                            }
                        ],
                        "properties": {
                            "value": {
                                "type": "integer"
                            },
                            "text": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "value",
                            "text"
                        ]
                    },
                    "password_must_mixed_case": {
                        "type": "object",
                        "description": "Password must contain both uppercase and lowercase letters",
                        "examples": [
                            {
                                "value": true,
                                "text": "The password must contain at least one uppercase and one lowercase letter."
                            }
                        ],
                        "properties": {
                            "value": {
                                "type": "boolean"
                            },
                            "text": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "value",
                            "text"
                        ]
                    },
                    "password_must_include_numbers": {
                        "type": "object",
                        "description": "Password must contain at least one number",
                        "examples": [
                            {
                                "value": true,
                                "text": "The password must contain at least one number."
                            }
                        ],
                        "properties": {
                            "value": {
                                "type": "boolean"
                            },
                            "text": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "value",
                            "text"
                        ]
                    },
                    "password_must_include_symbols": {
                        "type": "object",
                        "description": "Password must contain at least one symbol",
                        "examples": [
                            {
                                "value": true,
                                "text": "The password must contain at least one symbol."
                            }
                        ],
                        "properties": {
                            "value": {
                                "type": "boolean"
                            },
                            "text": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "value",
                            "text"
                        ]
                    },
                    "password_is_uncompromised": {
                        "type": "object",
                        "description": "Password must not appear in known data breaches",
                        "examples": [
                            {
                                "value": true,
                                "text": "Must not be a compromised password (by checking against a list of known compromised passwords)."
                            }
                        ],
                        "properties": {
                            "value": {
                                "type": "boolean"
                            },
                            "text": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "value",
                            "text"
                        ]
                    },
                    "no_reuse": {
                        "type": "object",
                        "description": "Password must not have been used before",
                        "examples": [
                            {
                                "value": true,
                                "text": "The password is unique and has not been used in the past."
                            }
                        ],
                        "properties": {
                            "value": {
                                "type": "boolean"
                            },
                            "text": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "value",
                            "text"
                        ]
                    }
                },
                "required": [
                    "password_min_length",
                    "no_reuse"
                ],
                "title": "PasswordRequirementsResource"
            },
            "PayOutstandingAmountRequest": {
                "type": "object",
                "properties": {
                    "payment_method": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Stripe payment method ID",
                        "examples": [
                            "pm_1234567890"
                        ]
                    },
                    "amount": {
                        "type": "number",
                        "description": "Amount to pay, capped at the outstanding balance",
                        "examples": [
                            50
                        ],
                        "minimum": 1,
                        "maximum": 9999.9999
                    },
                    "default_payment_method": {
                        "type": "string"
                    }
                },
                "title": "PayOutstandingAmountRequest"
            },
            "PaymentMethodResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "examples": [
                            "pm_1234567890"
                        ]
                    },
                    "brand": {
                        "type": "string",
                        "examples": [
                            "VISA"
                        ]
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "IE"
                        ]
                    },
                    "exp_month": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "12"
                        ]
                    },
                    "exp_year": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "2026"
                        ]
                    },
                    "last4": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "4242"
                        ]
                    },
                    "three_d_secure_usage": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_default": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "null"
                    },
                    "meta": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "brand",
                    "country",
                    "exp_month",
                    "exp_year",
                    "last4",
                    "three_d_secure_usage",
                    "is_default",
                    "created_at",
                    "meta"
                ],
                "title": "PaymentMethodResource"
            },
            "PinConversationRequest": {
                "type": "object",
                "properties": {
                    "is_pinned": {
                        "type": "boolean",
                        "description": "Whether to pin the conversation",
                        "examples": [
                            true
                        ]
                    }
                },
                "title": "PinConversationRequest"
            },
            "PublicHoliday": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "calendar_date": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "country": {
                        "type": "string"
                    },
                    "menu_time_zone": {
                        "type": "string"
                    },
                    "holiday_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "holiday_description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "holiday_type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "calendar_date",
                    "country",
                    "menu_time_zone",
                    "holiday_name",
                    "holiday_description",
                    "holiday_type"
                ],
                "title": "PublicHoliday"
            },
            "PublicHolidaySettingsCollection": {
                "type": "object",
                "properties": {
                    "holidays": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PublicHolidaysAction"
                        }
                    },
                    "ivrs": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/AccountInfoMenuOption"
                        }
                    }
                },
                "required": [
                    "holidays",
                    "ivrs"
                ],
                "title": "PublicHolidaySettingsCollection"
            },
            "PublicHolidaySettingsUpdateRequest": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Public holiday action model identifier",
                        "examples": [
                            1
                        ]
                    },
                    "menu_id": {
                        "type": "string",
                        "description": "IVR menu identifier",
                        "examples": [
                            1
                        ]
                    },
                    "first_action": {
                        "type": "integer",
                        "description": "First action identifier",
                        "examples": [
                            1
                        ]
                    },
                    "first_action_data": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "First action data",
                        "examples": [
                            "3,24"
                        ]
                    },
                    "second_action": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Second action identifier",
                        "examples": [
                            2
                        ]
                    },
                    "second_action_data": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Second action data",
                        "examples": [
                            "13"
                        ]
                    },
                    "pub_holiday_country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Public holiday country code",
                        "examples": [
                            "IE"
                        ]
                    }
                },
                "required": [
                    "menu_id",
                    "first_action"
                ],
                "title": "PublicHolidaySettingsUpdateRequest"
            },
            "PublicHolidaysAction": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "account_code": {
                        "type": "string"
                    },
                    "menu_id": {
                        "type": "integer"
                    },
                    "first_action": {
                        "type": "integer"
                    },
                    "first_action_data": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "second_action": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "second_action_data": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "account_code",
                    "menu_id",
                    "first_action",
                    "first_action_data",
                    "second_action",
                    "second_action_data"
                ],
                "title": "PublicHolidaysAction"
            },
            "QueueDynamicAgentResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "date": {
                        "type": "string",
                        "examples": [
                            "Jun 15 2020 10:37:51"
                        ]
                    },
                    "account": {
                        "type": "string",
                        "examples": [
                            "IE-12345"
                        ]
                    },
                    "ext": {
                        "type": "integer",
                        "examples": [
                            33
                        ]
                    },
                    "queue": {
                        "type": "integer",
                        "examples": [
                            10
                        ]
                    },
                    "action": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "user_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "user_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Test"
                        ]
                    },
                    "platform": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "platform_name": {
                        "type": "string",
                        "examples": [
                            "Wallboard"
                        ]
                    }
                },
                "required": [
                    "id",
                    "date",
                    "account",
                    "ext",
                    "queue",
                    "action",
                    "user_id",
                    "user_name",
                    "platform",
                    "platform_name"
                ],
                "title": "QueueDynamicAgentResource"
            },
            "RequestCallBackActionRequest": {
                "type": "object",
                "properties": {
                    "method": {
                        "type": "string",
                        "description": "Callback method (extension or queue)",
                        "enum": [
                            "extension",
                            "queue"
                        ],
                        "examples": [
                            "extension"
                        ]
                    },
                    "from_number": {
                        "type": "string",
                        "description": "Source extension or queue number",
                        "examples": [
                            "100"
                        ],
                        "maxLength": 20
                    },
                    "dst_number": {
                        "type": "string",
                        "description": "Destination phone number",
                        "examples": [
                            "+353861234567"
                        ],
                        "maxLength": 20
                    }
                },
                "required": [
                    "method",
                    "from_number",
                    "dst_number"
                ],
                "title": "RequestCallBackActionRequest"
            },
            "RequestPurchaseNumbersRequest": {
                "type": "object",
                "properties": {
                    "category": {
                        "type": "string",
                        "description": "Number category",
                        "enum": [
                            "paid_1"
                        ],
                        "examples": [
                            "paid_1"
                        ]
                    },
                    "numbers": {
                        "type": "array",
                        "description": "Array of phone numbers to purchase",
                        "examples": [
                            [
                                "+35312345678"
                            ]
                        ],
                        "items": {
                            "type": "string"
                        },
                        "minItems": 1
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optional description for the order",
                        "examples": [
                            "New office numbers"
                        ]
                    }
                },
                "required": [
                    "category",
                    "numbers"
                ],
                "title": "RequestPurchaseNumbersRequest"
            },
            "SaveBalanceAutoTopUpRequest": {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "integer",
                        "description": "Top up amount",
                        "examples": [
                            20
                        ],
                        "minimum": 1,
                        "maximum": 9999
                    },
                    "balance_limit": {
                        "type": "integer",
                        "description": "Balance limit threshold",
                        "examples": [
                            20
                        ],
                        "minimum": 1
                    },
                    "payment_method": {
                        "type": "string",
                        "description": "Stripe payment method or saved card reference",
                        "examples": [
                            "pm_1LD5nSAfZ3HRScSs8z5TF55a"
                        ]
                    }
                },
                "required": [
                    "amount",
                    "balance_limit",
                    "payment_method"
                ],
                "title": "SaveBalanceAutoTopUpRequest"
            },
            "SaveCallAutoTopUpRequest": {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "integer",
                        "description": "Top up amount",
                        "examples": [
                            20
                        ],
                        "minimum": 1,
                        "maximum": 9999
                    },
                    "credit_limit": {
                        "type": "integer",
                        "description": "Credit limit threshold",
                        "examples": [
                            20
                        ],
                        "minimum": 1
                    },
                    "payment_method": {
                        "type": "string",
                        "description": "Stripe payment method or saved card reference",
                        "examples": [
                            "pm_1LD5nSAfZ3HRScSs8z5TF55a"
                        ]
                    }
                },
                "required": [
                    "amount",
                    "credit_limit",
                    "payment_method"
                ],
                "title": "SaveCallAutoTopUpRequest"
            },
            "SaveSmsAutoTopUpRequest": {
                "type": "object",
                "properties": {
                    "package_id": {
                        "type": "integer",
                        "description": "SMS package identifier",
                        "examples": [
                            3
                        ]
                    },
                    "credit_limit": {
                        "type": "integer",
                        "description": "Credit limit threshold",
                        "examples": [
                            20
                        ],
                        "minimum": 1
                    },
                    "payment_method": {
                        "type": "string",
                        "description": "Stripe payment method or saved card reference",
                        "examples": [
                            "pm_1LD5nSAfZ3HRScSs8z5TF55a"
                        ]
                    }
                },
                "required": [
                    "package_id",
                    "credit_limit",
                    "payment_method"
                ],
                "title": "SaveSmsAutoTopUpRequest"
            },
            "SendFaxRequest": {
                "type": "object",
                "properties": {
                    "recipientNumber": {
                        "type": "string",
                        "description": "Recipient phone number",
                        "examples": [
                            353851234567
                        ]
                    },
                    "files": {
                        "type": "array",
                        "description": "Files to send (.jpg, .jpeg, .pdf, max 5MB total)",
                        "items": {
                            "type": "string",
                            "format": "binary",
                            "contentMediaType": "application/octet-stream"
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "recipientNumber",
                    "files"
                ],
                "title": "SendFaxRequest"
            },
            "SendSmsRequest": {
                "type": "object",
                "properties": {
                    "from": {
                        "type": "string",
                        "description": "Sender name or number",
                        "examples": [
                            "NUACOM"
                        ]
                    },
                    "send_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "Scheduled send time",
                        "examples": [
                            "2026-04-10 14:30:00"
                        ]
                    },
                    "message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "SMS message content",
                        "examples": [
                            "Hello, this is a test message"
                        ]
                    },
                    "template_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Approved 10DLC campaign template ID (required to send to USA numbers)",
                        "examples": [
                            42
                        ]
                    },
                    "to": {
                        "type": "array",
                        "description": "List of recipients with phone numbers",
                        "examples": [
                            [
                                {
                                    "number": "+353861234567",
                                    "reference": "appointment-123"
                                }
                            ]
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "number": {
                                    "type": "string"
                                },
                                "reference": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                }
                            },
                            "required": [
                                "number"
                            ]
                        },
                        "minItems": 1
                    },
                    "media_ids": {
                        "type": "array",
                        "description": "IDs from POST /v2/mms/media (max 10) to send the message as MMS; needs the mms feature and US, CA or AU recipients",
                        "examples": [
                            [
                                "3facde2c-6f3b-4a4e-9d1e-2b1f0c9a8d77"
                            ]
                        ],
                        "items": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "maxItems": 10
                    }
                },
                "required": [
                    "from",
                    "to"
                ],
                "title": "SendSmsRequest"
            },
            "SetAgentQueueStatusRequest": {
                "type": "object",
                "properties": {
                    "queue": {
                        "type": "string",
                        "description": "Queue number",
                        "examples": [
                            "10"
                        ]
                    },
                    "extension": {
                        "type": "string",
                        "description": "Extension number",
                        "examples": [
                            "10"
                        ]
                    },
                    "action": {
                        "type": "string",
                        "description": "Agent queue action",
                        "enum": [
                            "login",
                            "logoff"
                        ],
                        "examples": [
                            "login"
                        ]
                    }
                },
                "required": [
                    "queue",
                    "extension",
                    "action"
                ],
                "title": "SetAgentQueueStatusRequest"
            },
            "SetExtensionNameRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Extension display name",
                        "examples": [
                            "Reception"
                        ],
                        "maxLength": 50
                    }
                },
                "required": [
                    "name"
                ],
                "title": "SetExtensionNameRequest"
            },
            "SetInboundEmailsRequest": {
                "type": "object",
                "properties": {
                    "emails": {
                        "type": "array",
                        "description": "Inbound email addresses",
                        "examples": [
                            [
                                "fax@example.com"
                            ]
                        ],
                        "items": {
                            "type": "string",
                            "format": "email"
                        }
                    }
                },
                "required": [
                    "emails"
                ],
                "title": "SetInboundEmailsRequest"
            },
            "SetOutboundEmailsRequest": {
                "type": "object",
                "properties": {
                    "emails": {
                        "type": "array",
                        "description": "Outbound email addresses",
                        "examples": [
                            [
                                "fax@example.com"
                            ]
                        ],
                        "items": {
                            "type": "string",
                            "format": "email"
                        }
                    }
                },
                "required": [
                    "emails"
                ],
                "title": "SetOutboundEmailsRequest"
            },
            "SetPaymentMethodAsDefaultRequest": {
                "type": "object",
                "properties": {
                    "payment_method": {
                        "type": "string",
                        "description": "Stripe payment method ID",
                        "examples": [
                            "pm_1234567890"
                        ]
                    }
                },
                "required": [
                    "payment_method"
                ],
                "title": "SetPaymentMethodAsDefaultRequest"
            },
            "SettingsStoreRequest": {
                "type": "object",
                "properties": {
                    "call_logs_retention_interval": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ISO 8601 duration for call logs retention",
                        "examples": [
                            "P1Y"
                        ]
                    },
                    "sms_history_retention_interval": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ISO 8601 duration for SMS history retention",
                        "examples": [
                            "P6M"
                        ]
                    },
                    "call_recording_retention_interval": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ISO 8601 duration for call recording retention",
                        "examples": [
                            "P3Y"
                        ]
                    },
                    "fax_data_retention_interval": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ISO 8601 duration for fax data retention",
                        "examples": [
                            "P1Y"
                        ]
                    },
                    "voicemail_retention_interval": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Voicemail retention intervals keyed by mailbox ID (null key for account-level)",
                        "examples": [
                            {
                                "null": "P30D",
                                "123": "P14D"
                            }
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "title": "SettingsStoreRequest"
            },
            "SkippedCallStatusResource": {
                "type": "object",
                "properties": {
                    "call_id": {
                        "type": "string",
                        "examples": [
                            "1651753116.134"
                        ]
                    },
                    "queue": {
                        "type": "string",
                        "examples": [
                            "1"
                        ]
                    },
                    "agent": {
                        "type": "string",
                        "examples": [
                            "10"
                        ]
                    },
                    "caller_id": {
                        "type": "string",
                        "examples": [
                            "08213213331"
                        ]
                    },
                    "status": {
                        "type": "string",
                        "examples": [
                            "RINGNOANSWER"
                        ]
                    },
                    "event_date": {
                        "type": "string",
                        "examples": [
                            "Jan 1 2023 00:01:00"
                        ]
                    }
                },
                "required": [
                    "call_id",
                    "queue",
                    "agent",
                    "caller_id",
                    "status",
                    "event_date"
                ],
                "title": "SkippedCallStatusResource"
            },
            "SmsActivityResource": {
                "type": "object",
                "properties": {
                    "sms_id": {
                        "type": "integer",
                        "description": "SMS ID @example 98765"
                    },
                    "date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "SMS Scheduled Date @example \"2024-03-13T14:00:00+00:00\""
                    },
                    "sms_message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "SMS Content @example \"Hello!\""
                    },
                    "sms_type": {
                        "type": "integer",
                        "description": "SMS Type @example 0"
                    },
                    "status": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Delivery Status @example 0"
                    }
                },
                "required": [
                    "sms_id",
                    "date",
                    "sms_message",
                    "sms_type",
                    "status"
                ],
                "title": "SmsActivityResource"
            },
            "SmsAutoTopUpResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "account_id": {
                        "type": "string",
                        "examples": [
                            "IE-00491"
                        ]
                    },
                    "user_id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "payment_type": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            2
                        ]
                    },
                    "payment_method": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "pm_1LD5nSAfZ3HRScSs8z5TF55a"
                        ]
                    },
                    "package_id": {
                        "type": "integer",
                        "examples": [
                            3
                        ]
                    },
                    "credit_limit": {
                        "type": "integer",
                        "examples": [
                            20
                        ]
                    },
                    "set_time": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            "2022-08-11T12:42:52.000000Z"
                        ]
                    }
                },
                "required": [
                    "id",
                    "account_id",
                    "user_id",
                    "payment_type",
                    "payment_method",
                    "package_id",
                    "credit_limit",
                    "set_time"
                ],
                "title": "SmsAutoTopUpResource"
            },
            "SmsGwPrice": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "channel": {
                        "type": "integer"
                    },
                    "country_id": {
                        "type": "integer"
                    },
                    "country_iso": {
                        "type": "string"
                    },
                    "gateway_id": {
                        "type": "integer"
                    },
                    "country_code": {
                        "type": "string"
                    },
                    "price": {
                        "type": "number"
                    },
                    "money_price": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "wa_message_type": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "channel",
                    "country_id",
                    "country_iso",
                    "gateway_id",
                    "country_code",
                    "price",
                    "money_price",
                    "wa_message_type"
                ],
                "title": "SmsGwPrice"
            },
            "SmsMessagesDataTableRequest": {
                "type": "object",
                "properties": {
                    "sEcho": {
                        "type": "integer",
                        "description": "DataTables parameters",
                        "examples": [
                            1
                        ]
                    },
                    "iDisplayStart": {
                        "type": "integer",
                        "description": "Display start offset",
                        "examples": [
                            0
                        ],
                        "minimum": 0
                    },
                    "iDisplayLength": {
                        "type": "integer",
                        "description": "Number of rows to display",
                        "examples": [
                            25
                        ],
                        "minimum": -1
                    },
                    "iSortingCols": {
                        "type": "integer",
                        "description": "Number of sorting columns",
                        "examples": [
                            1
                        ],
                        "minimum": 0
                    },
                    "sSearch": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Global search term",
                        "examples": [
                            "hello"
                        ],
                        "maxLength": 255
                    },
                    "type": {
                        "type": "string",
                        "description": "Custom filters",
                        "examples": [
                            "outgoing"
                        ]
                    },
                    "search_by_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Phone number search filter",
                        "examples": [
                            "0851234567"
                        ],
                        "maxLength": 20
                    },
                    "iSortCol_*": {
                        "type": "integer",
                        "description": "Dynamic DataTables parameters (regex patterns)"
                    },
                    "sSortDir_*": {
                        "type": "string",
                        "enum": [
                            "asc",
                            "desc"
                        ]
                    },
                    "bSortable_*": {
                        "type": "string",
                        "enum": [
                            "true",
                            "false"
                        ]
                    },
                    "bSearchable_*": {
                        "type": "string",
                        "enum": [
                            "true",
                            "false"
                        ]
                    },
                    "sSearch_*": {
                        "type": "string",
                        "maxLength": 255
                    }
                },
                "title": "SmsMessagesDataTableRequest"
            },
            "SmsOverviewRequest": {
                "type": "object",
                "properties": {
                    "from": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Sender name, number, or WhatsApp number",
                        "examples": [
                            "NUACOM"
                        ]
                    },
                    "type": {
                        "type": "string",
                        "description": "SMS type identifier",
                        "enum": [
                            "0",
                            "1",
                            "2",
                            "3",
                            "4"
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "promo_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Promotion name (max 25 chars)",
                        "examples": [
                            "Summer Sale"
                        ],
                        "maxLength": 25
                    },
                    "promo_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Promotion ID",
                        "examples": [
                            42
                        ]
                    },
                    "promotion_period_from": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "Promotion start date",
                        "examples": [
                            "2026-04-10"
                        ]
                    },
                    "promotion_period_to": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "Promotion end date",
                        "examples": [
                            "2026-04-30"
                        ]
                    },
                    "send_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "Scheduled send time",
                        "examples": [
                            "2026-04-10 14:30:00"
                        ]
                    },
                    "template_id": {
                        "type": "string",
                        "description": "Approved SMS template ID",
                        "examples": [
                            5
                        ]
                    },
                    "channel_type": {
                        "type": "integer",
                        "description": "Channel type (1=SMS, 2=WhatsApp)",
                        "enum": [
                            "1",
                            "2",
                            "3"
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "wa_template_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "WhatsApp template ID (required for WhatsApp)",
                        "examples": [
                            10
                        ]
                    },
                    "wa_parameters": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "WhatsApp template parameters, JSON keyed by placeholder number",
                        "examples": [
                            {
                                "1": {
                                    "type": "custom",
                                    "value": "Anna"
                                }
                            }
                        ]
                    },
                    "media_ids": {
                        "type": "array",
                        "description": "IDs from POST /v2/mms/media (max 10) to send the draft as MMS",
                        "examples": [
                            [
                                "3facde2c-6f3b-4a4e-9d1e-2b1f0c9a8d77"
                            ]
                        ],
                        "items": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "maxItems": 10
                    }
                },
                "title": "SmsOverviewRequest"
            },
            "SmsPackagesResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "amount": {
                        "type": "integer",
                        "examples": [
                            20
                        ]
                    },
                    "cost": {
                        "type": "number",
                        "examples": [
                            30
                        ]
                    }
                },
                "required": [
                    "id",
                    "amount",
                    "cost"
                ],
                "title": "SmsPackagesResource"
            },
            "SmsTemplateResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            123
                        ]
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Welcome Template"
                        ]
                    },
                    "message_text": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Hello {{name}}, welcome!"
                        ]
                    },
                    "sender_names": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "status": {
                        "examples": [
                            1
                        ],
                        "$ref": "#/components/schemas/SmsTemplateStatus"
                    },
                    "opt_in": {
                        "type": "boolean",
                        "examples": [
                            true
                        ]
                    },
                    "opt_out": {
                        "type": "boolean",
                        "examples": [
                            false
                        ]
                    },
                    "usage": {
                        "type": "string",
                        "enum": [
                            "10dlc",
                            "sms",
                            "whatsapp"
                        ],
                        "examples": [
                            "sms"
                        ]
                    },
                    "config": {
                        "anyOf": [
                            {
                                "type": "object",
                                "additionalProperties": {}
                            },
                            {
                                "type": "null"
                            },
                            {
                                "type": "array",
                                "items": {}
                            }
                        ]
                    },
                    "category": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            2
                        ]
                    },
                    "category_text": {
                        "type": "string",
                        "examples": [
                            "Marketing"
                        ]
                    },
                    "sender_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "NUACOM"
                        ]
                    }
                },
                "required": [
                    "id",
                    "name",
                    "message_text",
                    "sender_names",
                    "status",
                    "opt_in",
                    "opt_out",
                    "usage",
                    "config",
                    "category",
                    "category_text",
                    "sender_id"
                ],
                "title": "SmsTemplateResource"
            },
            "SmsTemplateStatus": {
                "type": "integer",
                "enum": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7,
                    8,
                    9,
                    10
                ],
                "title": "SmsTemplateStatus"
            },
            "SoftphoneAnnouncement": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "account_id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "filename": {
                        "type": "string"
                    },
                    "size": {
                        "type": "integer"
                    },
                    "duration": {
                        "type": "integer"
                    }
                },
                "required": [
                    "id",
                    "account_id",
                    "name",
                    "description",
                    "filename",
                    "size",
                    "duration"
                ],
                "title": "SoftphoneAnnouncement"
            },
            "SoftphoneAnnouncementStoreRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 25
                    },
                    "description": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "file": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application/octet-stream"
                    },
                    "base64_file": {
                        "type": "string"
                    },
                    "duration": {
                        "type": "number"
                    }
                },
                "required": [
                    "name"
                ],
                "title": "SoftphoneAnnouncementStoreRequest"
            },
            "SoftphoneAnnouncementUpdateRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 25
                    },
                    "description": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "file": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application/octet-stream"
                    },
                    "base64_file": {
                        "type": "string"
                    },
                    "duration": {
                        "type": "number"
                    }
                },
                "title": "SoftphoneAnnouncementUpdateRequest"
            },
            "SpeedDialRequest": {
                "type": "array",
                "items": {
                    "type": "object",
                    "properties": {
                        "code": {
                            "type": "integer",
                            "minimum": 120,
                            "maximum": 220
                        },
                        "number": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 20
                        },
                        "notes": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 50
                        }
                    },
                    "required": [
                        "code"
                    ]
                },
                "minItems": 1,
                "maxItems": 100,
                "title": "SpeedDialRequest"
            },
            "StoreAccountAiConfigRequest": {
                "type": "object",
                "properties": {
                    "is_recap_email_enabled": {
                        "type": "boolean",
                        "description": "Email recap status",
                        "examples": [
                            true
                        ]
                    },
                    "recipients": {
                        "type": "array",
                        "description": "Array of recipients including departments (prefixed with d)",
                        "examples": [
                            [
                                "d431",
                                "12345"
                            ]
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "extra_config": {
                        "type": "object",
                        "description": "Extra config with duration limits and admin forwarding settings",
                        "examples": [
                            {
                                "isDurationLimited": true,
                                "durationLimitMinutes": 5,
                                "durationLimitSeconds": 30,
                                "shouldForwardToAdmins": false,
                                "forwardToAdminsIds": []
                            }
                        ],
                        "properties": {
                            "isDurationLimited": {
                                "type": "boolean"
                            },
                            "durationLimitMinutes": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 15
                            },
                            "durationLimitSeconds": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 59
                            },
                            "shouldForwardToAdmins": {
                                "type": "boolean"
                            },
                            "forwardToAdminsIds": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                },
                "required": [
                    "is_recap_email_enabled"
                ],
                "title": "StoreAccountAiConfigRequest"
            },
            "StoreAccountLanguageConfigRequest": {
                "type": "object",
                "properties": {
                    "number_languages": {
                        "type": "array",
                        "description": "Default language(s) for call transcription/analysis",
                        "examples": [
                            [
                                "en"
                            ]
                        ],
                        "items": {
                            "$ref": "#/components/schemas/SupportedLanguage"
                        },
                        "minItems": 1
                    },
                    "voicemail_languages": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Default language(s) for voicemail transcription. Pass null/omit to leave the existing value untouched, or a list (including []) to replace it entirely. Ignored (and existing settings deleted) unless the account has the paid AI Call Analysis addon",
                        "examples": [
                            [
                                "en"
                            ]
                        ],
                        "items": {
                            "$ref": "#/components/schemas/SupportedLanguage"
                        }
                    },
                    "number_overrides": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Per-number language overrides",
                        "examples": [
                            [
                                {
                                    "in_ext": "35350534456",
                                    "languages": [
                                        "en",
                                        "pl"
                                    ]
                                }
                            ]
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "in_ext": {
                                    "type": "string",
                                    "pattern": "^\\+?\\d+$",
                                    "maxLength": 20
                                },
                                "languages": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/SupportedLanguage"
                                    },
                                    "minItems": 1
                                }
                            },
                            "required": [
                                "in_ext",
                                "languages"
                            ]
                        }
                    },
                    "voicemail_overrides": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Per-voicemail-box language overrides \u2014 optional and ignored by the backend unless the account has the paid AI Call Analysis addon",
                        "examples": [
                            [
                                {
                                    "voicemail_box": 10,
                                    "languages": [
                                        "en"
                                    ]
                                }
                            ]
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "voicemail_box": {
                                    "type": "integer"
                                },
                                "languages": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/SupportedLanguage"
                                    },
                                    "minItems": 1
                                }
                            },
                            "required": [
                                "voicemail_box",
                                "languages"
                            ]
                        }
                    }
                },
                "required": [
                    "number_languages"
                ],
                "title": "StoreAccountLanguageConfigRequest"
            },
            "StoreAppointmentRequest": {
                "type": "object",
                "properties": {
                    "contacts": {
                        "type": "string",
                        "description": "Contact phone numbers",
                        "examples": [
                            353861234567
                        ]
                    },
                    "time_zone": {
                        "type": "string",
                        "description": "Timezone for the appointment",
                        "examples": [
                            "Europe/Dublin"
                        ]
                    },
                    "date_to_send": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Appointment date and time",
                        "examples": [
                            "2026-04-10 14:30"
                        ]
                    },
                    "send_before": {
                        "type": "string",
                        "description": "When to send reminder relative to appointment",
                        "enum": [
                            "1day",
                            "1week"
                        ],
                        "examples": [
                            "1day"
                        ]
                    },
                    "sender_name": {
                        "type": "string",
                        "description": "SMS sender name or number",
                        "examples": [
                            "NUACOM"
                        ]
                    },
                    "sms_session": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Existing SMS session ID (max 32 chars)",
                        "examples": [
                            "sess_abc123"
                        ],
                        "maxLength": 32
                    }
                },
                "required": [
                    "contacts",
                    "time_zone",
                    "date_to_send",
                    "send_before",
                    "sender_name"
                ],
                "title": "StoreAppointmentRequest"
            },
            "StoreConversationSettingsRequest": {
                "type": "object",
                "properties": {
                    "settings": {
                        "type": "object",
                        "description": "Per channel (`sms`, `whatsapp`): `auto_assigning` rules map numbers to a user or department, `time_to_respond` rules set the expected reply time in minutes",
                        "examples": [
                            "{\"auto_assigning\": {\"sms\": {\"enabled\": true, \"rules\": [{\"numbers\": [\"353861234567\"], \"assign_to\": {\"type\": \"user\", \"id\": 42}}]}, \"time_to_respond\": {\"sms\": {\"enabled\": true, \"rules\": [{\"numbers\": [\"353861234567\"], \"time_to_respond\": 30}]}}}"
                        ],
                        "properties": {
                            "auto_assigning": {
                                "type": "array",
                                "description": "Auto assigning validation - dynamically validate any channel",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "enabled": {
                                            "type": "boolean"
                                        },
                                        "rules": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "numbers": {
                                                        "type": "string"
                                                    },
                                                    "assign_to": {
                                                        "type": "object",
                                                        "properties": {
                                                            "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                    "department",
                                                                    "user"
                                                                ]
                                                            },
                                                            "id": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "type",
                                                            "id"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "numbers",
                                                    "assign_to"
                                                ]
                                            }
                                        }
                                    }
                                },
                                "minItems": 1
                            },
                            "time_to_respond": {
                                "type": "array",
                                "description": "Time to respond validation - dynamically validate any channel",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "enabled": {
                                            "type": "boolean"
                                        },
                                        "rules": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "numbers": {
                                                        "type": "string"
                                                    },
                                                    "time_to_respond": {
                                                        "type": "integer",
                                                        "minimum": 1
                                                    }
                                                },
                                                "required": [
                                                    "numbers"
                                                ]
                                            }
                                        }
                                    }
                                },
                                "minItems": 1
                            }
                        },
                        "required": [
                            "auto_assigning",
                            "time_to_respond"
                        ]
                    }
                },
                "required": [
                    "settings"
                ],
                "title": "StoreConversationSettingsRequest"
            },
            "StoreExtensionsRequest": {
                "type": "object",
                "properties": {
                    "from": {
                        "type": "integer",
                        "description": "Starting extension number",
                        "examples": [
                            100
                        ]
                    },
                    "to": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Ending extension number for range",
                        "examples": [
                            110
                        ]
                    },
                    "subscription_id": {
                        "type": "integer",
                        "description": "Subscription ID",
                        "examples": [
                            1
                        ]
                    },
                    "callerID": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Caller ID to assign",
                        "examples": [
                            "+353212345678"
                        ]
                    }
                },
                "required": [
                    "from",
                    "subscription_id"
                ],
                "title": "StoreExtensionsRequest"
            },
            "StoreKeywordTrackerRequest": {
                "type": "object",
                "properties": {
                    "tracker_name": {
                        "type": "string",
                        "description": "Tracker name",
                        "examples": [
                            "Tracker1"
                        ],
                        "maxLength": 255
                    },
                    "keywords": {
                        "type": "string",
                        "description": "Comma-separated keywords",
                        "examples": [
                            "keyword1,keyword2"
                        ],
                        "maxLength": 1024
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "Whether the tracker is active",
                        "examples": [
                            true
                        ]
                    },
                    "filters": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Filter list with id and group",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "string",
                                    "maxLength": 50
                                },
                                "group": {
                                    "type": "string",
                                    "maxLength": 50
                                }
                            },
                            "required": [
                                "id",
                                "group"
                            ]
                        }
                    },
                    "email_alerts": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Email alert list with id and group",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "string",
                                    "maxLength": 50
                                },
                                "group": {
                                    "type": "string",
                                    "maxLength": 50
                                }
                            },
                            "required": [
                                "id",
                                "group"
                            ]
                        }
                    },
                    "tags": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Tag ID list",
                        "examples": [
                            [
                                1001
                            ]
                        ],
                        "items": {
                            "type": "string",
                            "maxLength": 50
                        }
                    }
                },
                "required": [
                    "tracker_name",
                    "keywords",
                    "is_active"
                ],
                "title": "StoreKeywordTrackerRequest"
            },
            "StoreSmsTemplateRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Template name",
                        "examples": [
                            "Welcome Template"
                        ],
                        "maxLength": 255
                    },
                    "message_text": {
                        "type": "string",
                        "description": "Template message text",
                        "examples": [
                            "Hello {{name}}, welcome!"
                        ]
                    },
                    "opt_in": {
                        "type": "boolean",
                        "description": "Opt-in flag",
                        "examples": [
                            true
                        ]
                    },
                    "opt_out": {
                        "type": "boolean",
                        "description": "Opt-out flag",
                        "examples": [
                            false
                        ]
                    },
                    "channel": {
                        "type": "integer",
                        "description": "Communication channel (1=SMS, 2=WhatsApp)",
                        "enum": [
                            "1",
                            "2"
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "config": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Campaign configuration, pass null for simple SMS templates",
                        "items": {
                            "type": "string"
                        }
                    },
                    "sender_id": {
                        "type": "string",
                        "description": "Sender ID",
                        "examples": [
                            "NUACOM"
                        ]
                    }
                },
                "required": [
                    "name",
                    "message_text",
                    "opt_in",
                    "opt_out",
                    "channel"
                ],
                "title": "StoreSmsTemplateRequest"
            },
            "StoreWebhookSubscriptionRequest": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "description": "Webhook event type",
                        "enum": [
                            "call_event_listeners",
                            "call_event",
                            "inbound_call_event",
                            "inbound_missed_call_event",
                            "outbound_call_event",
                            "outbound_answered_call_event",
                            "call_answered",
                            "call_missed",
                            "call_initiated",
                            "call_updated",
                            "sms_delivery_status",
                            "tag_added",
                            "tag_removed",
                            "note_added",
                            "note_updated",
                            "note_removed",
                            "ivr_option_selected",
                            "voicemail_received",
                            "message_received",
                            "message_sent"
                        ],
                        "examples": [
                            "call_event"
                        ]
                    },
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "URL to receive webhook events",
                        "examples": [
                            "https://your-app.com/webhook"
                        ],
                        "maxLength": 500
                    }
                },
                "required": [
                    "type",
                    "url"
                ],
                "title": "StoreWebhookSubscriptionRequest"
            },
            "StoreWhatsappTemplateRequest": {
                "type": "object",
                "properties": {
                    "submit_after_approval": {
                        "type": "boolean",
                        "description": "Submission intent flag",
                        "examples": [
                            false
                        ]
                    },
                    "name": {
                        "type": "string",
                        "description": "Basic template fields",
                        "examples": [
                            "welcome_message"
                        ],
                        "maxLength": 255
                    },
                    "category": {
                        "type": "integer",
                        "description": "Template category (1=Authentication, 2=Marketing, 3=Utility)",
                        "enum": [
                            "1",
                            "2",
                            "3"
                        ],
                        "examples": [
                            2
                        ]
                    },
                    "language": {
                        "type": "string",
                        "description": "Template language code",
                        "examples": [
                            "en"
                        ],
                        "minLength": 2,
                        "maxLength": 10
                    },
                    "sender_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "WhatsApp sender number, as listed by GET /v2/sms/sender_names?filter[channel]=whatsapp",
                        "examples": [
                            353871234567
                        ],
                        "maxLength": 20
                    },
                    "header": {
                        "type": "object",
                        "description": "Header component (optional)",
                        "examples": [
                            {
                                "type": "image",
                                "media_id": "5f180090-bf82-4869-9114-7ba1f7cb6e55"
                            }
                        ],
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "text",
                                    "image",
                                    "video",
                                    "document",
                                    "audio"
                                ]
                            },
                            "text": {
                                "type": "string",
                                "maxLength": 60
                            },
                            "media": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "binary",
                                "contentMediaType": "application/octet-stream",
                                "description": "Media: either file upload, URL, or pre-uploaded media_id"
                            },
                            "media_url": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "maxLength": 2048
                            },
                            "media_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uuid"
                            }
                        }
                    },
                    "body": {
                        "type": "object",
                        "description": "Body component (required)",
                        "examples": [
                            {
                                "text": "Hi {{1}}, your appointment is on {{2}}.",
                                "variables": [
                                    "Anna",
                                    "Monday 10:00"
                                ]
                            }
                        ],
                        "properties": {
                            "text": {
                                "type": "string",
                                "maxLength": 1024
                            },
                            "variables": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "maxLength": 100
                                },
                                "maxItems": 10
                            }
                        },
                        "required": [
                            "text"
                        ]
                    },
                    "footer": {
                        "type": "object",
                        "description": "Footer component (optional)",
                        "examples": [
                            {
                                "text": "Reply STOP to opt out"
                            }
                        ],
                        "properties": {
                            "text": {
                                "type": "string",
                                "maxLength": 60
                            }
                        }
                    },
                    "buttons": {
                        "type": "array",
                        "description": "Buttons component (optional)",
                        "examples": [
                            [
                                {
                                    "type": "QUICK_REPLY",
                                    "text": "Confirm"
                                },
                                {
                                    "type": "URL",
                                    "text": "Open",
                                    "url": "https://example.com/booking"
                                }
                            ]
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "type": {
                                    "type": "string",
                                    "enum": [
                                        "QUICK_REPLY",
                                        "PHONE_NUMBER",
                                        "URL",
                                        "COPY_CODE",
                                        "VOICE_CALL"
                                    ]
                                },
                                "text": {
                                    "type": "string",
                                    "maxLength": 25
                                },
                                "phone_number": {
                                    "type": "string",
                                    "maxLength": 20
                                },
                                "url": {
                                    "type": "string",
                                    "format": "uri",
                                    "maxLength": 2000
                                }
                            },
                            "required": [
                                "type",
                                "text"
                            ]
                        },
                        "maxItems": 10
                    }
                },
                "required": [
                    "name",
                    "category",
                    "language",
                    "body"
                ],
                "title": "StoreWhatsappTemplateRequest"
            },
            "Stringable": {
                "type": "string",
                "title": "Stringable"
            },
            "SubscriptionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Essentials"
                        ]
                    },
                    "description": {
                        "type": "string",
                        "examples": [
                            ""
                        ]
                    },
                    "price": {
                        "type": "number",
                        "examples": [
                            9.99
                        ]
                    },
                    "available_in_zone": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "description",
                    "price",
                    "available_in_zone"
                ],
                "title": "SubscriptionResource"
            },
            "SupportedLanguage": {
                "type": "string",
                "description": "For a complete list of supported languages, see the Deepgram documentation.\n",
                "enum": [
                    "af",
                    "ar",
                    "hy",
                    "as",
                    "be",
                    "bn",
                    "bs",
                    "bg",
                    "ca",
                    "zh",
                    "hr",
                    "cs",
                    "da",
                    "nl",
                    "en",
                    "et",
                    "fi",
                    "fr",
                    "ka",
                    "de",
                    "el",
                    "gu",
                    "he",
                    "hi",
                    "hu",
                    "id",
                    "it",
                    "ja",
                    "kn",
                    "ko",
                    "lv",
                    "lt",
                    "mk",
                    "ms",
                    "mr",
                    "mn",
                    "ne",
                    "no",
                    "ps",
                    "fa",
                    "pl",
                    "pt",
                    "pa",
                    "ro",
                    "ru",
                    "sr",
                    "sk",
                    "sl",
                    "es",
                    "sv",
                    "tl",
                    "ta",
                    "te",
                    "th",
                    "tr",
                    "uk",
                    "ur",
                    "vi"
                ],
                "title": "SupportedLanguage"
            },
            "SyncContactGroupsRequest": {
                "type": "object",
                "properties": {
                    "groups": {
                        "type": "array",
                        "description": "Array with Groups ID of Contact (empty array removes all groups)",
                        "examples": [
                            [
                                1,
                                2,
                                3,
                                4
                            ]
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "groups"
                ],
                "title": "SyncContactGroupsRequest"
            },
            "TeamRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Team name",
                        "examples": [
                            "IT"
                        ],
                        "maxLength": 20
                    },
                    "members": {
                        "type": "array",
                        "description": "Array of user IDs",
                        "examples": [
                            [
                                1,
                                2,
                                3
                            ]
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "name"
                ],
                "title": "TeamRequest"
            },
            "TeamResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "Test"
                        ]
                    },
                    "users": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebUserResource"
                        }
                    },
                    "users_count": {
                        "type": "string",
                        "examples": [
                            "1"
                        ]
                    },
                    "team": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebUserResource"
                        }
                    }
                },
                "required": [
                    "id",
                    "name",
                    "users_count"
                ],
                "title": "TeamResource"
            },
            "TopUpBalanceRequest": {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "integer",
                        "description": "Top up amount",
                        "examples": [
                            20
                        ],
                        "minimum": 1,
                        "maximum": 9999
                    },
                    "payment_method": {
                        "type": "string",
                        "description": "Payment method identifier",
                        "examples": [
                            "pm_1LD5nSAfZ3HRScSs8z5TF55a"
                        ]
                    }
                },
                "required": [
                    "amount",
                    "payment_method"
                ],
                "title": "TopUpBalanceRequest"
            },
            "TopUpCalculationResource": {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "number",
                        "examples": [
                            20
                        ]
                    },
                    "vat_rate": {
                        "type": "number",
                        "examples": [
                            0.23
                        ]
                    },
                    "vat": {
                        "type": "number",
                        "examples": [
                            4.6
                        ]
                    },
                    "total": {
                        "type": "number",
                        "examples": [
                            24.6
                        ]
                    }
                },
                "required": [
                    "amount",
                    "vat_rate",
                    "vat",
                    "total"
                ],
                "title": "TopUpCalculationResource"
            },
            "TopUpSmsRequest": {
                "type": "object",
                "properties": {
                    "package_id": {
                        "type": "integer",
                        "description": "SMS package identifier",
                        "examples": [
                            3
                        ]
                    },
                    "payment_method": {
                        "type": "string",
                        "description": "Payment method identifier",
                        "examples": [
                            "pm_1LD5nSAfZ3HRScSs8z5TF55a"
                        ]
                    }
                },
                "required": [
                    "package_id",
                    "payment_method"
                ],
                "title": "TopUpSmsRequest"
            },
            "UpdateAccountBillingInfoData": {
                "type": "object",
                "description": "The editable billing details: only the address; the company and contact details are read only.\nThe currency is not editable: changing it mid-life would reprice every open charge.",
                "properties": {
                    "address_line_1": {
                        "type": "string",
                        "examples": [
                            "8 Springfield Drive"
                        ],
                        "maxLength": 100
                    },
                    "address_line_2": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Blank when there is none, as the address row stores it.",
                        "examples": [
                            "Clane Road"
                        ],
                        "maxLength": 100
                    },
                    "city": {
                        "type": "string",
                        "examples": [
                            "Celbridge"
                        ],
                        "maxLength": 60
                    },
                    "county": {
                        "type": "string",
                        "examples": [
                            "Kildare"
                        ],
                        "maxLength": 60
                    },
                    "country_iso_code": {
                        "type": "string",
                        "examples": [
                            "IE"
                        ]
                    },
                    "post_code": {
                        "type": "string",
                        "examples": [
                            "W23 X2Y3"
                        ],
                        "maxLength": 10
                    }
                },
                "required": [
                    "address_line_1",
                    "city",
                    "county",
                    "country_iso_code",
                    "post_code"
                ],
                "title": "UpdateAccountBillingInfoData"
            },
            "UpdatePasswordRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "User email",
                        "examples": [
                            "user@domain.com"
                        ]
                    },
                    "password": {
                        "type": "string",
                        "description": "Current user password in plain",
                        "examples": [
                            "qwerty123"
                        ]
                    },
                    "new_password": {
                        "type": "string",
                        "description": "New password in plain",
                        "examples": [
                            "qwerty1234"
                        ],
                        "maxLength": 32
                    },
                    "new_password_confirmation": {
                        "type": "string",
                        "description": "New password confirmation",
                        "examples": [
                            "qwerty1234"
                        ],
                        "maxLength": 32
                    }
                },
                "required": [
                    "email",
                    "new_password",
                    "new_password_confirmation"
                ],
                "title": "UpdatePasswordRequest"
            },
            "UpdateWhatsappTemplateRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Basic template fields (all optional for update)",
                        "examples": [
                            "welcome_message"
                        ],
                        "maxLength": 255
                    },
                    "category": {
                        "type": "integer",
                        "description": "Template category (1=Authentication, 2=Marketing, 3=Utility)",
                        "enum": [
                            "1",
                            "2",
                            "3"
                        ],
                        "examples": [
                            2
                        ]
                    },
                    "language": {
                        "type": "string",
                        "description": "Template language code",
                        "examples": [
                            "en"
                        ],
                        "minLength": 2,
                        "maxLength": 10
                    },
                    "sender_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "WhatsApp sender number, as listed by GET /v2/sms/sender_names?filter[channel]=whatsapp",
                        "examples": [
                            353871234567
                        ],
                        "maxLength": 20
                    },
                    "header": {
                        "type": "object",
                        "description": "Header component (optional)",
                        "examples": [
                            {
                                "type": "image",
                                "media_id": "5f180090-bf82-4869-9114-7ba1f7cb6e55"
                            }
                        ],
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "text",
                                    "image",
                                    "video",
                                    "document",
                                    "audio"
                                ]
                            },
                            "text": {
                                "type": "string",
                                "maxLength": 60
                            },
                            "media": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "binary",
                                "contentMediaType": "application/octet-stream",
                                "description": "Media: either file upload, URL, or pre-uploaded media_id"
                            },
                            "media_url": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "maxLength": 2048
                            },
                            "media_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uuid"
                            }
                        }
                    },
                    "body": {
                        "type": "object",
                        "description": "Body component (optional for update)",
                        "examples": [
                            {
                                "text": "Hi {{1}}, your appointment is on {{2}}.",
                                "variables": [
                                    "Anna",
                                    "Monday 10:00"
                                ]
                            }
                        ],
                        "properties": {
                            "text": {
                                "type": "string",
                                "maxLength": 1024
                            },
                            "variables": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "maxLength": 100
                                },
                                "maxItems": 10
                            }
                        }
                    },
                    "footer": {
                        "type": "object",
                        "description": "Footer component (optional)",
                        "examples": [
                            {
                                "text": "Reply STOP to opt out"
                            }
                        ],
                        "properties": {
                            "text": {
                                "type": "string",
                                "maxLength": 60
                            }
                        }
                    },
                    "buttons": {
                        "type": "array",
                        "description": "Buttons component (optional)",
                        "examples": [
                            [
                                {
                                    "type": "QUICK_REPLY",
                                    "text": "Confirm"
                                },
                                {
                                    "type": "URL",
                                    "text": "Open",
                                    "url": "https://example.com/booking"
                                }
                            ]
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "type": {
                                    "type": "string",
                                    "enum": [
                                        "QUICK_REPLY",
                                        "PHONE_NUMBER",
                                        "URL",
                                        "COPY_CODE",
                                        "VOICE_CALL"
                                    ]
                                },
                                "text": {
                                    "type": "string",
                                    "maxLength": 25
                                },
                                "phone_number": {
                                    "type": "string",
                                    "maxLength": 20
                                },
                                "url": {
                                    "type": "string",
                                    "format": "uri",
                                    "maxLength": 2000
                                }
                            },
                            "required": [
                                "type",
                                "text"
                            ]
                        },
                        "maxItems": 10
                    }
                },
                "title": "UpdateWhatsappTemplateRequest"
            },
            "UploadAudioRequest": {
                "type": "object",
                "properties": {
                    "base64_file": {
                        "type": "string",
                        "description": "Base64-encoded audio file content",
                        "examples": [
                            "data:audio/wav;base64,UklGR..."
                        ]
                    },
                    "file": {
                        "type": "string",
                        "description": "Uploaded audio file"
                    },
                    "rec_number": {
                        "type": "string",
                        "description": "Announcement recording number",
                        "examples": [
                            "1"
                        ]
                    }
                },
                "required": [
                    "rec_number"
                ],
                "title": "UploadAudioRequest"
            },
            "UploadMmsMessageMediaRequest": {
                "type": "object",
                "properties": {
                    "file": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application/octet-stream"
                    }
                },
                "required": [
                    "file"
                ],
                "title": "UploadMmsMessageMediaRequest"
            },
            "UploadOrganizationLogoRequest": {
                "type": "object",
                "properties": {
                    "logo": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application/octet-stream",
                        "description": "Maximum file size: 2048 kilobytes."
                    }
                },
                "required": [
                    "logo"
                ],
                "title": "UploadOrganizationLogoRequest"
            },
            "UploadWhatsappMessageMediaRequest": {
                "type": "object",
                "properties": {
                    "file": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application/octet-stream",
                        "description": "Maximum file size: 16384 kilobytes."
                    }
                },
                "required": [
                    "file"
                ],
                "title": "UploadWhatsappMessageMediaRequest"
            },
            "UserInfoResource": {
                "type": "object",
                "properties": {
                    "user_id": {
                        "type": "string",
                        "examples": [
                            "44936"
                        ]
                    },
                    "user_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "George"
                        ]
                    },
                    "account_id": {
                        "type": "string",
                        "examples": [
                            "IE-00491"
                        ]
                    },
                    "account_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Prod Test Account"
                        ]
                    },
                    "user_country": {
                        "type": "string",
                        "examples": [
                            "IE"
                        ]
                    },
                    "time_zone": {
                        "type": "string",
                        "examples": [
                            "Europe/Dublin"
                        ]
                    },
                    "user_shared_accounts": {
                        "type": "object",
                        "examples": [
                            [
                                "IE-00490"
                            ]
                        ],
                        "additionalProperties": {}
                    },
                    "recording_access": {
                        "type": "boolean",
                        "examples": [
                            false
                        ]
                    },
                    "user_admin": {
                        "type": "string",
                        "examples": [
                            true
                        ]
                    },
                    "outbound_cli": {
                        "type": "string",
                        "examples": [
                            "35312345678"
                        ]
                    },
                    "user_extension": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            101
                        ]
                    },
                    "call_events": {
                        "type": "integer",
                        "const": 1,
                        "examples": [
                            1
                        ]
                    }
                },
                "required": [
                    "user_id",
                    "user_name",
                    "account_id",
                    "account_name",
                    "user_country",
                    "time_zone",
                    "user_shared_accounts",
                    "recording_access",
                    "user_admin",
                    "outbound_cli"
                ],
                "title": "UserInfoResource"
            },
            "UsersListItemResource": {
                "type": "object",
                "properties": {
                    "user_id": {
                        "type": "string",
                        "examples": [
                            "123"
                        ]
                    },
                    "account_id": {
                        "type": "string",
                        "examples": [
                            "IE-00123"
                        ]
                    },
                    "account_admin": {
                        "type": "boolean",
                        "description": "Account admin",
                        "examples": [
                            true
                        ]
                    },
                    "web_access": {
                        "type": "boolean",
                        "description": "Can sign in to the web portal",
                        "examples": [
                            true
                        ]
                    },
                    "call_recording": {
                        "type": "boolean",
                        "description": "Can play call recordings from the call logs",
                        "examples": [
                            true
                        ]
                    },
                    "mobile_extension": {
                        "type": "boolean",
                        "description": "Can use a mobile extension",
                        "examples": [
                            false
                        ]
                    },
                    "user_active": {
                        "type": "string",
                        "description": "0 Suspended, 1 Active, 2 Awaiting activation",
                        "examples": [
                            "1"
                        ]
                    },
                    "active_in_account": {
                        "type": "boolean",
                        "description": "This is the user's currently selected account",
                        "examples": [
                            true
                        ]
                    },
                    "web_user_status": {
                        "type": "string",
                        "const": "1",
                        "examples": [
                            "1"
                        ]
                    },
                    "user_email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "jane@example.com"
                        ]
                    },
                    "user_extension": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            10
                        ]
                    },
                    "last_login": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "2024-08-28T09:15:00+01:00"
                        ]
                    },
                    "user_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "Jane Doe"
                        ]
                    },
                    "deleted": {
                        "type": "boolean",
                        "examples": [
                            false
                        ]
                    },
                    "country_iso_code": {
                        "type": "string",
                        "examples": [
                            "IE"
                        ]
                    },
                    "country_dial_code": {
                        "type": "string",
                        "examples": [
                            "353"
                        ]
                    },
                    "time_zone": {
                        "type": "string",
                        "examples": [
                            "Europe/Dublin"
                        ]
                    },
                    "mobile": {
                        "type": "string",
                        "examples": [
                            "+353861234567"
                        ]
                    },
                    "is_auth_2fa_enabled": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "examples": [
                            false
                        ]
                    },
                    "is_live_call_monitoring_enabled": {
                        "type": "string",
                        "examples": [
                            "0"
                        ]
                    },
                    "validate_user_email_submitted_time": {
                        "type": "null",
                        "examples": [
                            null
                        ]
                    },
                    "call_event_listener": {
                        "type": "boolean",
                        "examples": [
                            true
                        ]
                    },
                    "call_events": {
                        "type": "boolean",
                        "examples": [
                            true
                        ]
                    },
                    "outbound_cli": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Caller ID the user's extension presents on outbound calls",
                        "examples": [
                            "+35315551234"
                        ]
                    },
                    "primary_user": {
                        "type": "boolean",
                        "examples": [
                            false
                        ]
                    }
                },
                "required": [
                    "user_id",
                    "account_id",
                    "account_admin",
                    "web_access",
                    "call_recording",
                    "mobile_extension",
                    "user_active",
                    "active_in_account",
                    "web_user_status",
                    "user_email",
                    "user_extension",
                    "last_login",
                    "user_name",
                    "deleted",
                    "country_iso_code",
                    "country_dial_code",
                    "time_zone",
                    "mobile",
                    "is_auth_2fa_enabled",
                    "is_live_call_monitoring_enabled",
                    "validate_user_email_submitted_time",
                    "call_event_listener",
                    "call_events",
                    "outbound_cli",
                    "primary_user"
                ],
                "title": "UsersListItemResource"
            },
            "VoicemailLanguageOverrideResource": {
                "type": "object",
                "properties": {
                    "voicemail_box": {
                        "type": "integer"
                    },
                    "languages": {
                        "type": "array",
                        "items": {}
                    }
                },
                "required": [
                    "voicemail_box",
                    "languages"
                ],
                "title": "VoicemailLanguageOverrideResource"
            },
            "WebUserAccountResource": {
                "type": "object",
                "properties": {
                    "user_id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "account_id": {
                        "type": "string",
                        "examples": [
                            "IE-00123"
                        ]
                    },
                    "account_admin": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Account admin",
                        "examples": [
                            true
                        ]
                    },
                    "web_access": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Can sign in to the web portal",
                        "examples": [
                            true
                        ]
                    },
                    "call_recording": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Can play call recordings from the call logs",
                        "examples": [
                            true
                        ]
                    },
                    "mobile_extension": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Can use a mobile extension",
                        "examples": [
                            false
                        ]
                    },
                    "user_active": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "0 Suspended, 1 Active, 2 Awaiting activation",
                        "examples": [
                            1
                        ]
                    },
                    "active_in_account": {
                        "type": "boolean",
                        "description": "This is the user's currently selected account",
                        "examples": [
                            true
                        ]
                    }
                },
                "required": [
                    "user_id",
                    "account_id",
                    "account_admin",
                    "web_access",
                    "call_recording",
                    "mobile_extension",
                    "user_active",
                    "active_in_account"
                ],
                "title": "WebUserAccountResource"
            },
            "WebUserDetailedResource": {
                "type": "object",
                "properties": {
                    "user_id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "mobile": {
                        "type": "string",
                        "examples": [
                            "+12346798"
                        ]
                    },
                    "user_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "John Doe"
                        ]
                    },
                    "user_email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "john@doe.com"
                        ]
                    },
                    "last_login": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            ""
                        ]
                    },
                    "extension": {
                        "examples": [
                            10
                        ],
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "string",
                                "enum": [
                                    ""
                                ]
                            }
                        ]
                    },
                    "user_active": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "time_zone": {
                        "type": "string",
                        "examples": [
                            "Europe/Dublin"
                        ]
                    },
                    "country_dial_code": {
                        "type": "integer",
                        "examples": [
                            353
                        ]
                    },
                    "account": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebUserAccountResource"
                        }
                    },
                    "departments": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TeamResource"
                        }
                    }
                },
                "required": [
                    "user_id",
                    "mobile",
                    "user_name",
                    "user_email",
                    "last_login",
                    "extension",
                    "user_active",
                    "time_zone",
                    "country_dial_code",
                    "account"
                ],
                "title": "WebUserDetailedResource"
            },
            "WebUserRequest": {
                "type": "object",
                "properties": {
                    "user": {
                        "type": "object",
                        "properties": {
                            "user_name": {
                                "type": "string",
                                "maxLength": 64
                            },
                            "mobile": {
                                "type": "string",
                                "maxLength": 30
                            },
                            "country_dial_code": {
                                "type": "integer"
                            },
                            "time_zone": {
                                "type": "string",
                                "maxLength": 20
                            },
                            "is_auth_2fa_enabled": {
                                "type": "boolean"
                            },
                            "extension": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "account_admin": {
                                "type": "integer"
                            },
                            "web_access": {
                                "type": "integer"
                            },
                            "mobile_extension": {
                                "type": "integer"
                            },
                            "call_recording": {
                                "type": "integer"
                            },
                            "departments": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            }
                        },
                        "required": [
                            "user_name"
                        ]
                    },
                    "pages": {
                        "type": "array",
                        "description": "User pages",
                        "examples": [
                            [
                                1,
                                2,
                                3
                            ]
                        ],
                        "items": {
                            "type": "integer"
                        }
                    }
                },
                "required": [
                    "user"
                ],
                "title": "WebUserRequest"
            },
            "WebUserResource": {
                "type": "object",
                "properties": {
                    "user_id": {
                        "type": "integer",
                        "examples": [
                            1
                        ]
                    },
                    "mobile": {
                        "type": "string",
                        "examples": [
                            "+12346798"
                        ]
                    },
                    "user_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "John Doe"
                        ]
                    },
                    "user_email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "john@doe.com"
                        ]
                    },
                    "last_login": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "examples": [
                            ""
                        ]
                    },
                    "extension": {
                        "examples": [
                            10
                        ],
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "string",
                                "enum": [
                                    ""
                                ]
                            }
                        ]
                    },
                    "user_active": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            1
                        ]
                    },
                    "departments": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TeamResource"
                        }
                    }
                },
                "required": [
                    "user_id",
                    "mobile",
                    "user_name",
                    "user_email",
                    "last_login",
                    "extension",
                    "user_active"
                ],
                "title": "WebUserResource"
            },
            "WebhookSubscriptionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "type": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "type",
                    "url"
                ],
                "title": "WebhookSubscriptionResource"
            },
            "WhatsappTemplateResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "examples": [
                            123
                        ]
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "welcome_message"
                        ]
                    },
                    "category": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "examples": [
                            2
                        ]
                    },
                    "category_label": {
                        "type": "string",
                        "examples": [
                            "Marketing"
                        ]
                    },
                    "language": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "en"
                        ]
                    },
                    "status": {
                        "examples": [
                            1
                        ],
                        "$ref": "#/components/schemas/SmsTemplateStatus"
                    },
                    "status_label": {
                        "type": "string",
                        "examples": [
                            "Approved"
                        ]
                    },
                    "sender_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "whatsapp:+353871234567"
                        ]
                    },
                    "template_sid": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
                        ]
                    },
                    "components": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "examples": [
                            {
                                "header": {
                                    "type": "image",
                                    "text": null
                                },
                                "body": {
                                    "text": "Hi {{1}}, your appointment is on {{2}}.",
                                    "variables": [
                                        "Anna",
                                        "Monday 10:00"
                                    ]
                                },
                                "footer": {
                                    "text": "Reply STOP to opt out"
                                },
                                "buttons": [
                                    {
                                        "type": "QUICK_REPLY",
                                        "text": "Confirm"
                                    }
                                ]
                            }
                        ],
                        "properties": {
                            "header": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string"
                                    },
                                    "text": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "type",
                                    "text"
                                ]
                            },
                            "body": {
                                "type": "object",
                                "properties": {
                                    "text": {
                                        "anyOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "string",
                                                "enum": [
                                                    ""
                                                ]
                                            }
                                        ]
                                    },
                                    "variables": {
                                        "anyOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "array",
                                                "items": {
                                                    "type": "string"
                                                },
                                                "minItems": 0,
                                                "maxItems": 0,
                                                "additionalItems": false
                                            }
                                        ]
                                    }
                                },
                                "required": [
                                    "text",
                                    "variables"
                                ]
                            },
                            "footer": {
                                "type": "object",
                                "properties": {
                                    "text": {
                                        "anyOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "string",
                                                "enum": [
                                                    ""
                                                ]
                                            }
                                        ]
                                    }
                                },
                                "required": [
                                    "text"
                                ]
                            },
                            "buttons": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "minItems": 0,
                                        "maxItems": 0,
                                        "additionalItems": false
                                    }
                                ]
                            }
                        },
                        "required": [
                            "header",
                            "body",
                            "footer",
                            "buttons"
                        ]
                    },
                    "media": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "examples": [
                            {
                                "type": "image",
                                "size": 102400,
                                "size_formatted": "100.00 KB",
                                "media_id": "5f180090-bf82-4869-9114-7ba1f7cb6e55",
                                "moderation_status": "approved",
                                "url": "https://api.api-nuacom.com/v2/whatsapp/media/5f180090-bf82-4869-9114-7ba1f7cb6e55/preview.jpg?expires=1778091256&signature=47177ec4"
                            }
                        ],
                        "items": {}
                    },
                    "permissions": {
                        "type": "object",
                        "properties": {
                            "can_edit": {
                                "type": "boolean",
                                "examples": [
                                    true
                                ]
                            },
                            "can_delete": {
                                "type": "boolean",
                                "examples": [
                                    true
                                ]
                            },
                            "can_submit": {
                                "type": "string",
                                "examples": [
                                    true
                                ]
                            }
                        },
                        "required": [
                            "can_edit",
                            "can_delete",
                            "can_submit"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "2026-04-10T14:30:00+00:00"
                        ]
                    },
                    "synced_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            "2026-04-10T14:35:00+00:00"
                        ]
                    }
                },
                "required": [
                    "id",
                    "name",
                    "category",
                    "category_label",
                    "language",
                    "status",
                    "status_label",
                    "sender_id",
                    "template_sid",
                    "components",
                    "media",
                    "permissions",
                    "updated_at",
                    "synced_at"
                ],
                "title": "WhatsappTemplateResource"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "AuthorizationException": {
                "description": "Authorization error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "LicensingOperationException": {
                "description": "Validation error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            }
        }
    }
}