Jump to

  • Quickstarts
  • API reference
  • Webhook events
  • Error codes
  • SDKs

API reference

Settings

Get call settings

get/v1/settings/calls

Reads the organization’s call settings (whether AI calls are on).

aiCallsEnabled is the organization’s switch for machine-run calls — POST /v1/calls in AI_AGENT and EXTERNAL_AGENT mode, AI campaigns and sequences, and numbers routed to an AI agent; recordingRequired says whether every call is recorded (read only here). Send version back on PATCH /v1/settings/calls.

Access: an organization key with the settings:read scope.

Response 200PublicCallSettings

  • aiCallsEnabledbooleanRequired

    Whether machine-run calls are allowed: POST /v1/calls in AI_AGENT and EXTERNAL_AGENT mode, AI campaigns and sequences, and numbers routed to an AI agent. Off, those are refused (409 AI_CALLS_DISABLED; an inbound caller hears a short apology). The organization’s whole policy: the console’s Settings › Calling policy reads and writes the same switch.

  • liveCallLimitsPublicLiveCallLimits | nullRequired

    T9, read only: the live calls POST /v1/calls admits at once — every key together (perOrganization) and per key (perKey); one over either is 429 CALL_CONCURRENCY_LIMIT. The deployment’s caps, or your organization’s own where the platform set them (ask it for more). Null only on a deployment that does not report them.

    2 fields of liveCallLimits
    • perKeyintegerRequired

      Live /v1 calls one key may hold at once.

    • perOrganizationintegerRequired

      Live /v1 calls the organization may hold at once, every key together.

  • objectstringRequired

    One ofcall_settings

  • recordingRequiredbooleanRequired

    Read only here: whether the organization records every call. When it does, a recorded POST /v1/calls needs recording.consentEvidence.

  • updatedAtstring (date-time)Required

  • versionintegerRequired

    Pass back as version on PATCH: a compare-and-set on the organization (409 SETTINGS_VERSION_CONFLICT when it moved).

    at least 1

  • warningsPublicAgentNumberWarning[]

    2026-11-07. Only in the answer to PATCH /v1/settings/calls: while AI calls are off (aiCallsEnabled: false), every number of the organization whose calls now refuse because of it — an ai route (its calls are refused AI_AGENT_UNAVAILABLE) and each AI step of a routed flow (the caller takes the step’s fallback, AI_CALLS_DISABLED) — each AI_AGENT_UNAVAILABLE with reason: AI_CALLS_DISABLED, the warning the number itself carries (GET /v1/numbers/{numberId}). Either way (2026-11-07), every other cause those routes and steps fail on too, one warning each — so switched on, the numbers that still cannot take AI calls, and why (it answered []). Without numbers:read a warning carries only numberId, code and reason (detail: false).

    11 fields of warnings
    • agentIdstring (uuid) | nullRequired

      The AI agent the number’s route or step reaches; null for a key without numbers:read.

    • callTypestringRequired

      Always full_ai here: an AI route, or a flow’s AI step.

      One ofmanualfull_ai

    • codestringRequired

      As on the number’s own warnings, and here only ever about an AI agent: AI_AGENT_UNAVAILABLE (the agent cannot take the caller — reason AI_CALLS_DISABLED, AGENT_INACTIVE or TEST_AGENT) or AI_PROVIDER_UNAVAILABLE (its voice cannot run here — reason its availability.reason). One warning per cause, each with the same numberId (2026-11-07). Never BILLING_RATE_UNAVAILABLE.

      One ofBILLING_RATE_UNAVAILABLEAI_PROVIDER_UNAVAILABLEAI_AGENT_UNAVAILABLE

    • detailbooleanRequired

      2026-11-07: whether the number’s details are in it. False for a key without numbers:read: only numberId, code and reason are told, the channel, agent, flow and step are null, and message names no route.

    • directionstringRequired

      One ofinbound

    • flowIdstring (uuid) | nullRequired

      2026-11-07: the routed flow (GET /v1/call-flows/{flowId}) whose AI step it is about; null for an ai route’s own warning, and for a key without numbers:read.

    • messagestringRequired

    • numberIdstring (uuid)Required

      The number (GET /v1/numbers/{numberId}), which carries this warning on every read until its cause goes.

    • providerstring | nullRequired

      The channel the number’s calls arrive on; null for a key without numbers:read.

      One ofairtelexotelplivosimtelnyxtwilio

    • reasonstring | nullRequired

      Why: AI_CALLS_DISABLED, AGENT_INACTIVE or TEST_AGENT for AI_AGENT_UNAVAILABLE; the agent’s availability.reason (lower case) for AI_PROVIDER_UNAVAILABLE.

      One ofvoice_key_missingagent_id_missingtranscription_key_missingreasoning_key_missingmodel_unknownAI_CALLS_DISABLEDAGENT_INACTIVETEST_AGENT

    • stepPublicNumberWarningStep | nullRequired

      The AI step of the routed flow it is about; null when it is about the route itself, and for a key without numbers:read.

      2 fields of step
      • indexintegerRequired

        Its position in the node, from 0: the step is nodes.<node>.<index> of the flow’s published version (the path POST /v1/call-flows/validate names its issues by).

        at least 0

      • nodestringRequired

        The node the step is in.

Errors

Request
curl 'https://api.trovacast.com/v1/settings/calls' \
  -H "Authorization: Bearer $TROVACAST_API_KEY"
Response 200 (json)
{
  "aiCallsEnabled": true,
  "liveCallLimits": {
    "perKey": 1,
    "perOrganization": 1
  },
  "object": "call_settings",
  "recordingRequired": true,
  "updatedAt": "2026-11-05T10:00:00.000Z",
  "version": 1,
  "warnings": [
    {
      "agentId": "AGENT_ID",
      "callType": "manual",
      "code": "BILLING_RATE_UNAVAILABLE",
      "detail": true,
      "direction": "inbound",
      "flowId": "FLOW_ID",
      "message": "AI agent 0f9e… is switched off (AGENT_INACTIVE), so a caller who reaches the AI step at nodes.main.1 of this number's flow takes the step's fallback instead (AI_AGENT_UNAVAILABLE) until it is switched on (PATCH /v1/agents/0f9e… with active: true) or the step names another agent.",
      "numberId": "NUMBER_ID",
      "provider": "airtel",
      "reason": "voice_key_missing",
      "step": {
        "index": 1,
        "node": "main"
      }
    }
  ]
}

Update call settings

patch/v1/settings/calls

Turns AI calls on or off, and recording of every call, for the organization.

aiCallsEnabled, recordingRequired, or both (at least one, else 400). recordingRequired is the console’s “Record every call”: while true every call is recorded and POST /v1/calls needs recording.consentEvidence; false lets each call say. A compare-and-set on the organization’s version: any change to the organization since you read it answers 409 SETTINGS_VERSION_CONFLICT. Switching off refuses new machine-run calls but ends none already live; the console’s calling policy reads the same switch. A change is audited against the key (organization.updated, with each changed value before and after); sending the value already set writes and records nothing. A test key is refused on a live organization (422 TEST_MODE_UNSUPPORTED); on a test organization (livemode: false, one a test integration key provisioned) it sets the switch its sandbox calls follow. Answers with warnings (2026-11-07): while AI calls are off, every number whose ai route or routed flow’s AI step now refuses its callers (AI_AGENT_UNAVAILABLE, reason: AI_CALLS_DISABLED), in the shape PATCH /v1/agents/{agentId} answers — only numberId, code and reason without numbers:read. Either way (2026-11-07), every other cause those routes and steps fail on too, one warning each: switched on, it lists the numbers that still cannot take AI calls, and why (it answered []).

Access: an organization key with the settings:write scope.

Headers

  • Idempotency-Keystring

    Makes the request safe to retry: a repeat with the same key and the same body returns the stored success (with Idempotent-Replayed: true) instead of running again; a 4xx stores nothing. A 5xx is stored and replayed to every retry with the same key (Idempotent-Replayed: true): the first attempt may have taken effect, so check before retrying with a new key — except the errors that provably changed nothing (503 MESSAGING_TRANSPORT, 503 WHATSAPP_CONNECT_UNAVAILABLE; see https://trovacast.com/developers/idempotency), which store nothing, so a retry with the same key runs again. 1–255 visible ASCII characters; kept for 24 hours.

Request body

  • aiCallsEnabledboolean

    Allow (true) or refuse (false) machine-run calls. A JSON boolean: the string "false" is refused, never read as true.

  • recordingRequiredboolean

    Record every call (true), or let each call say (false: recording.enabled on the request, a connect step’s record). A JSON boolean. While true, every call is recorded and a POST /v1/calls needs recording.consentEvidence.

  • versionintegerRequired

    The version you read.

    at least 1

Response 200PublicCallSettings

  • aiCallsEnabledbooleanRequired

    Whether machine-run calls are allowed: POST /v1/calls in AI_AGENT and EXTERNAL_AGENT mode, AI campaigns and sequences, and numbers routed to an AI agent. Off, those are refused (409 AI_CALLS_DISABLED; an inbound caller hears a short apology). The organization’s whole policy: the console’s Settings › Calling policy reads and writes the same switch.

  • liveCallLimitsPublicLiveCallLimits | nullRequired

    T9, read only: the live calls POST /v1/calls admits at once — every key together (perOrganization) and per key (perKey); one over either is 429 CALL_CONCURRENCY_LIMIT. The deployment’s caps, or your organization’s own where the platform set them (ask it for more). Null only on a deployment that does not report them.

    2 fields of liveCallLimits
    • perKeyintegerRequired

      Live /v1 calls one key may hold at once.

    • perOrganizationintegerRequired

      Live /v1 calls the organization may hold at once, every key together.

  • objectstringRequired

    One ofcall_settings

  • recordingRequiredbooleanRequired

    Read only here: whether the organization records every call. When it does, a recorded POST /v1/calls needs recording.consentEvidence.

  • updatedAtstring (date-time)Required

  • versionintegerRequired

    Pass back as version on PATCH: a compare-and-set on the organization (409 SETTINGS_VERSION_CONFLICT when it moved).

    at least 1

  • warningsPublicAgentNumberWarning[]

    2026-11-07. Only in the answer to PATCH /v1/settings/calls: while AI calls are off (aiCallsEnabled: false), every number of the organization whose calls now refuse because of it — an ai route (its calls are refused AI_AGENT_UNAVAILABLE) and each AI step of a routed flow (the caller takes the step’s fallback, AI_CALLS_DISABLED) — each AI_AGENT_UNAVAILABLE with reason: AI_CALLS_DISABLED, the warning the number itself carries (GET /v1/numbers/{numberId}). Either way (2026-11-07), every other cause those routes and steps fail on too, one warning each — so switched on, the numbers that still cannot take AI calls, and why (it answered []). Without numbers:read a warning carries only numberId, code and reason (detail: false).

    11 fields of warnings
    • agentIdstring (uuid) | nullRequired

      The AI agent the number’s route or step reaches; null for a key without numbers:read.

    • callTypestringRequired

      Always full_ai here: an AI route, or a flow’s AI step.

      One ofmanualfull_ai

    • codestringRequired

      As on the number’s own warnings, and here only ever about an AI agent: AI_AGENT_UNAVAILABLE (the agent cannot take the caller — reason AI_CALLS_DISABLED, AGENT_INACTIVE or TEST_AGENT) or AI_PROVIDER_UNAVAILABLE (its voice cannot run here — reason its availability.reason). One warning per cause, each with the same numberId (2026-11-07). Never BILLING_RATE_UNAVAILABLE.

      One ofBILLING_RATE_UNAVAILABLEAI_PROVIDER_UNAVAILABLEAI_AGENT_UNAVAILABLE

    • detailbooleanRequired

      2026-11-07: whether the number’s details are in it. False for a key without numbers:read: only numberId, code and reason are told, the channel, agent, flow and step are null, and message names no route.

    • directionstringRequired

      One ofinbound

    • flowIdstring (uuid) | nullRequired

      2026-11-07: the routed flow (GET /v1/call-flows/{flowId}) whose AI step it is about; null for an ai route’s own warning, and for a key without numbers:read.

    • messagestringRequired

    • numberIdstring (uuid)Required

      The number (GET /v1/numbers/{numberId}), which carries this warning on every read until its cause goes.

    • providerstring | nullRequired

      The channel the number’s calls arrive on; null for a key without numbers:read.

      One ofairtelexotelplivosimtelnyxtwilio

    • reasonstring | nullRequired

      Why: AI_CALLS_DISABLED, AGENT_INACTIVE or TEST_AGENT for AI_AGENT_UNAVAILABLE; the agent’s availability.reason (lower case) for AI_PROVIDER_UNAVAILABLE.

      One ofvoice_key_missingagent_id_missingtranscription_key_missingreasoning_key_missingmodel_unknownAI_CALLS_DISABLEDAGENT_INACTIVETEST_AGENT

    • stepPublicNumberWarningStep | nullRequired

      The AI step of the routed flow it is about; null when it is about the route itself, and for a key without numbers:read.

      2 fields of step
      • indexintegerRequired

        Its position in the node, from 0: the step is nodes.<node>.<index> of the flow’s published version (the path POST /v1/call-flows/validate names its issues by).

        at least 0

      • nodestringRequired

        The node the step is in.

Errors

Request
curl -X PATCH 'https://api.trovacast.com/v1/settings/calls' \
  -H "Authorization: Bearer $TROVACAST_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H 'Content-Type: application/json' \
  -d '{
  "version": 1
}'
Response 200 (json)
{
  "aiCallsEnabled": true,
  "liveCallLimits": {
    "perKey": 1,
    "perOrganization": 1
  },
  "object": "call_settings",
  "recordingRequired": true,
  "updatedAt": "2026-11-05T10:00:00.000Z",
  "version": 1,
  "warnings": [
    {
      "agentId": "AGENT_ID",
      "callType": "manual",
      "code": "BILLING_RATE_UNAVAILABLE",
      "detail": true,
      "direction": "inbound",
      "flowId": "FLOW_ID",
      "message": "AI agent 0f9e… is switched off (AGENT_INACTIVE), so a caller who reaches the AI step at nodes.main.1 of this number's flow takes the step's fallback instead (AI_AGENT_UNAVAILABLE) until it is switched on (PATCH /v1/agents/0f9e… with active: true) or the step names another agent.",
      "numberId": "NUMBER_ID",
      "provider": "airtel",
      "reason": "voice_key_missing",
      "step": {
        "index": 1,
        "node": "main"
      }
    }
  ]
}

Get destination settings

get/v1/settings/destinations

Reads where the organization’s calls may reach: the home market, opened and blocked country codes, child-leg prefixes and the TCPA acknowledgement.

The policy every dial is checked against, so you see before dialling what a call may reach: the home market’s country codes, those the platform opened or blocked for the organization, the prefixes a leg dialled from a live call may go to (one marked needsRate only when your plan gives it a rate of its own), and for +1 whether the TCPA acknowledgement is required and given, with the statement and its calling window. The platform operator opens and blocks destinations; the acknowledgement is the organization’s own — POST /v1/settings/destinations/tcpa (T9) or the console.

Access: an organization key with the settings:read scope.

Response 200PublicDestinationSettings

  • blockedCountryCodesstring[]Required

    Country calling codes blocked on every path — legs dialled from a live call (a transfer, a conference party, a BRIDGE number) included — unless the platform opened them for you (422 DESTINATION_BLOCKED). +1 is blocked by default.

  • childLegPrefixesPublicChildLegPrefix[]Required

    Where a leg dialled from a live call — a transfer, a conference party, a BRIDGE call’s number — may go: numbers starting with one of these (CHILD_DIAL_DESTINATION_NOT_ALLOWED otherwise).

    2 fields of childLegPrefixes
    • needsRatebooleanRequired

      True for a prefix opened for your organization beyond the deployment’s home market: a leg there is dialled only when your plan prices it with a rate of its own (see GET /v1/pricing), else DESTINATION_NOT_PRICED.

    • prefixstringRequired

  • defaultCountryCodesstring[]Required

    The home market: country calling codes a call to a contact reaches with nothing opened, at your plan’s standard rate. A call to a contact anywhere else — any country outside these and openedCountryCodes — is refused (422 DESTINATION_BLOCKED).

  • objectstringRequired

    One ofdestination_settings

  • openedCountryCodesstring[]Required

    Country calling codes beyond the home market that the platform opened for your organization. Each must be priced on your plan with a rate of its own (DESTINATION_NOT_PRICED) — never the standard home rate.

  • tcpaPublicTcpaSettingsRequired

    7 fields of tcpa
    • acknowledgedbooleanRequired

      Acknowledged against the current statement.

    • acknowledgedAtstring (date-time) | nullRequired

    • callingWindowPublicCallingWindowRequired

      The window a +1 call is held to in the called party’s local time — in EVERY time zone of their country, on every path, with no override (409 DESTINATION_CALLING_WINDOW_CLOSED, with nextAllowedAt).

      3 fields of callingWindow
      • daysinteger[]Required

        ISO weekdays (1 = Monday); empty = every day.

      • endstringRequired

      • startstringRequired

    • currentStatementVersionstringRequired

    • requiredbooleanRequired

      True when +1 is opened for your organization: calls there need your TCPA acknowledgement (console › Settings › Calling, or — T9 — POST /v1/settings/destinations/tcpa) — else DESTINATION_ACKNOWLEDGEMENT_REQUIRED.

    • statementstringRequired

      T9: the statement itself — the exact words POST /v1/settings/destinations/tcpa accepts for your organization, as currentStatementVersion. Show it to whoever decides before acknowledging.

    • statementVersionstring | nullRequired

Errors

Request
curl 'https://api.trovacast.com/v1/settings/destinations' \
  -H "Authorization: Bearer $TROVACAST_API_KEY"
Response 200 (json)
{
  "blockedCountryCodes": [
    "1"
  ],
  "childLegPrefixes": [
    {
      "needsRate": true,
      "prefix": "+91"
    }
  ],
  "defaultCountryCodes": [
    "91"
  ],
  "object": "destination_settings",
  "openedCountryCodes": [
    "44"
  ],
  "tcpa": {
    "acknowledged": true,
    "acknowledgedAt": "2026-11-05T10:00:00.000Z",
    "callingWindow": {
      "days": [
        1
      ],
      "end": "21:00",
      "start": "08:00"
    },
    "currentStatementVersion": "2026-11-05",
    "required": true,
    "statement": "STATEMENT",
    "statementVersion": "2026-11-05"
  }
}

Acknowledge tcpa

post/v1/settings/destinations/tcpa

Acknowledges the TCPA statement for the organization, so +1 calls may be placed where the platform opened +1.

The organization’s own statement of how it calls +1 numbers, as the console’s Settings › Calling gives it: send the currentStatementVersion of the statement you were shown (GET /v1/settings/destinations). Recorded with when, which statement and the key that gave it, and audited against the key (organization.destination_policy.tcpa_acknowledged). It opens nothing by itself: the platform operator decides whether +1 is opened for the organization, and every +1 call is still held to the calling window in the called party’s local time. Refused with 409 DESTINATION_STATEMENT_OUTDATED (with currentStatementVersion) when the statement changed since you read it. A test key is refused (422 TEST_MODE_UNSUPPORTED): the acknowledgement governs live calls.

Access: an organization key with the settings:write scope.

Headers

  • Idempotency-Keystring

    Makes the request safe to retry: a repeat with the same key and the same body returns the stored success (with Idempotent-Replayed: true) instead of running again; a 4xx stores nothing. A 5xx is stored and replayed to every retry with the same key (Idempotent-Replayed: true): the first attempt may have taken effect, so check before retrying with a new key — except the errors that provably changed nothing (503 MESSAGING_TRANSPORT, 503 WHATSAPP_CONNECT_UNAVAILABLE; see https://trovacast.com/developers/idempotency), which store nothing, so a retry with the same key runs again. 1–255 visible ASCII characters; kept for 24 hours.

Request body

  • statementVersionstringRequired

    The currentStatementVersion of the statement you were shown (GET /v1/settings/destinations). Another version is 409 DESTINATION_STATEMENT_OUTDATED: read it again.

    at most 32 characters

Response 200PublicDestinationSettings

  • blockedCountryCodesstring[]Required

    Country calling codes blocked on every path — legs dialled from a live call (a transfer, a conference party, a BRIDGE number) included — unless the platform opened them for you (422 DESTINATION_BLOCKED). +1 is blocked by default.

  • childLegPrefixesPublicChildLegPrefix[]Required

    Where a leg dialled from a live call — a transfer, a conference party, a BRIDGE call’s number — may go: numbers starting with one of these (CHILD_DIAL_DESTINATION_NOT_ALLOWED otherwise).

    2 fields of childLegPrefixes
    • needsRatebooleanRequired

      True for a prefix opened for your organization beyond the deployment’s home market: a leg there is dialled only when your plan prices it with a rate of its own (see GET /v1/pricing), else DESTINATION_NOT_PRICED.

    • prefixstringRequired

  • defaultCountryCodesstring[]Required

    The home market: country calling codes a call to a contact reaches with nothing opened, at your plan’s standard rate. A call to a contact anywhere else — any country outside these and openedCountryCodes — is refused (422 DESTINATION_BLOCKED).

  • objectstringRequired

    One ofdestination_settings

  • openedCountryCodesstring[]Required

    Country calling codes beyond the home market that the platform opened for your organization. Each must be priced on your plan with a rate of its own (DESTINATION_NOT_PRICED) — never the standard home rate.

  • tcpaPublicTcpaSettingsRequired

    7 fields of tcpa
    • acknowledgedbooleanRequired

      Acknowledged against the current statement.

    • acknowledgedAtstring (date-time) | nullRequired

    • callingWindowPublicCallingWindowRequired

      The window a +1 call is held to in the called party’s local time — in EVERY time zone of their country, on every path, with no override (409 DESTINATION_CALLING_WINDOW_CLOSED, with nextAllowedAt).

      3 fields of callingWindow
      • daysinteger[]Required

        ISO weekdays (1 = Monday); empty = every day.

      • endstringRequired

      • startstringRequired

    • currentStatementVersionstringRequired

    • requiredbooleanRequired

      True when +1 is opened for your organization: calls there need your TCPA acknowledgement (console › Settings › Calling, or — T9 — POST /v1/settings/destinations/tcpa) — else DESTINATION_ACKNOWLEDGEMENT_REQUIRED.

    • statementstringRequired

      T9: the statement itself — the exact words POST /v1/settings/destinations/tcpa accepts for your organization, as currentStatementVersion. Show it to whoever decides before acknowledging.

    • statementVersionstring | nullRequired

Errors

Request
curl -X POST 'https://api.trovacast.com/v1/settings/destinations/tcpa' \
  -H "Authorization: Bearer $TROVACAST_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H 'Content-Type: application/json' \
  -d '{
  "statementVersion": "2026-11-05"
}'
Response 200 (json)
{
  "blockedCountryCodes": [
    "1"
  ],
  "childLegPrefixes": [
    {
      "needsRate": true,
      "prefix": "+91"
    }
  ],
  "defaultCountryCodes": [
    "91"
  ],
  "object": "destination_settings",
  "openedCountryCodes": [
    "44"
  ],
  "tcpa": {
    "acknowledged": true,
    "acknowledgedAt": "2026-11-05T10:00:00.000Z",
    "callingWindow": {
      "days": [
        1
      ],
      "end": "21:00",
      "start": "08:00"
    },
    "currentStatementVersion": "2026-11-05",
    "required": true,
    "statement": "STATEMENT",
    "statementVersion": "2026-11-05"
  }
}

Withdraw tcpa

delete/v1/settings/destinations/tcpa

Withdraws the organization’s TCPA acknowledgement: +1 calls are refused again at once.

Every +1 call after it is DESTINATION_ACKNOWLEDGEMENT_REQUIRED until it is acknowledged again; calls already live are not ended. Audited against the key (organization.destination_policy.tcpa_withdrawn); with nothing acknowledged it changes and records nothing. A test key is refused (422 TEST_MODE_UNSUPPORTED).

Access: an organization key with the settings:write scope.

Headers

  • Idempotency-Keystring

    Makes the request safe to retry: a repeat with the same key and the same body returns the stored success (with Idempotent-Replayed: true) instead of running again; a 4xx stores nothing. A 5xx is stored and replayed to every retry with the same key (Idempotent-Replayed: true): the first attempt may have taken effect, so check before retrying with a new key — except the errors that provably changed nothing (503 MESSAGING_TRANSPORT, 503 WHATSAPP_CONNECT_UNAVAILABLE; see https://trovacast.com/developers/idempotency), which store nothing, so a retry with the same key runs again. 1–255 visible ASCII characters; kept for 24 hours.

Response 200PublicDestinationSettings

  • blockedCountryCodesstring[]Required

    Country calling codes blocked on every path — legs dialled from a live call (a transfer, a conference party, a BRIDGE number) included — unless the platform opened them for you (422 DESTINATION_BLOCKED). +1 is blocked by default.

  • childLegPrefixesPublicChildLegPrefix[]Required

    Where a leg dialled from a live call — a transfer, a conference party, a BRIDGE call’s number — may go: numbers starting with one of these (CHILD_DIAL_DESTINATION_NOT_ALLOWED otherwise).

    2 fields of childLegPrefixes
    • needsRatebooleanRequired

      True for a prefix opened for your organization beyond the deployment’s home market: a leg there is dialled only when your plan prices it with a rate of its own (see GET /v1/pricing), else DESTINATION_NOT_PRICED.

    • prefixstringRequired

  • defaultCountryCodesstring[]Required

    The home market: country calling codes a call to a contact reaches with nothing opened, at your plan’s standard rate. A call to a contact anywhere else — any country outside these and openedCountryCodes — is refused (422 DESTINATION_BLOCKED).

  • objectstringRequired

    One ofdestination_settings

  • openedCountryCodesstring[]Required

    Country calling codes beyond the home market that the platform opened for your organization. Each must be priced on your plan with a rate of its own (DESTINATION_NOT_PRICED) — never the standard home rate.

  • tcpaPublicTcpaSettingsRequired

    7 fields of tcpa
    • acknowledgedbooleanRequired

      Acknowledged against the current statement.

    • acknowledgedAtstring (date-time) | nullRequired

    • callingWindowPublicCallingWindowRequired

      The window a +1 call is held to in the called party’s local time — in EVERY time zone of their country, on every path, with no override (409 DESTINATION_CALLING_WINDOW_CLOSED, with nextAllowedAt).

      3 fields of callingWindow
      • daysinteger[]Required

        ISO weekdays (1 = Monday); empty = every day.

      • endstringRequired

      • startstringRequired

    • currentStatementVersionstringRequired

    • requiredbooleanRequired

      True when +1 is opened for your organization: calls there need your TCPA acknowledgement (console › Settings › Calling, or — T9 — POST /v1/settings/destinations/tcpa) — else DESTINATION_ACKNOWLEDGEMENT_REQUIRED.

    • statementstringRequired

      T9: the statement itself — the exact words POST /v1/settings/destinations/tcpa accepts for your organization, as currentStatementVersion. Show it to whoever decides before acknowledging.

    • statementVersionstring | nullRequired

Errors

Request
curl -X DELETE 'https://api.trovacast.com/v1/settings/destinations/tcpa' \
  -H "Authorization: Bearer $TROVACAST_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200 (json)
{
  "blockedCountryCodes": [
    "1"
  ],
  "childLegPrefixes": [
    {
      "needsRate": true,
      "prefix": "+91"
    }
  ],
  "defaultCountryCodes": [
    "91"
  ],
  "object": "destination_settings",
  "openedCountryCodes": [
    "44"
  ],
  "tcpa": {
    "acknowledged": true,
    "acknowledgedAt": "2026-11-05T10:00:00.000Z",
    "callingWindow": {
      "days": [
        1
      ],
      "end": "21:00",
      "start": "08:00"
    },
    "currentStatementVersion": "2026-11-05",
    "required": true,
    "statement": "STATEMENT",
    "statementVersion": "2026-11-05"
  }
}

Get SMS settings

get/v1/settings/sms

Reads the organization’s SMS settings: the HELP auto-reply.

What the platform texts back to a contact who texts HELP or INFO (helpReply, null when nothing is sent). configured is false until the organization has SMS settings. Send version back on PATCH /v1/settings/sms.

Access: an organization key with the settings:read scope.

Response 200PublicSmsSettings

  • configuredbooleanRequired

    False until the organization has SMS settings (set up in the console): nothing here can be set before.

  • helpReplystring | nullRequired

    What the platform texts back, from the number that got it, to a contact who texts HELP or INFO — once per thread every 10 minutes, outside India only, never to a contact who opted out of SMS; billed as a service SMS. US carriers expect it to name you and how to reach you, as your 10DLC campaign’s helpMessage does. Null: no reply is sent (the SMS provider’s own default reply, if its account has one, stands).

    at most 320 characters

  • objectstringRequired

    One ofsms_settings

  • updatedAtstring (date-time) | nullRequired

  • versionintegerRequired

    Pass back as version on PATCH: a compare-and-set on the SMS settings (409 SETTINGS_VERSION_CONFLICT when they moved). 0 while not configured.

    at least 0

Errors

Request
curl 'https://api.trovacast.com/v1/settings/sms' \
  -H "Authorization: Bearer $TROVACAST_API_KEY"
Response 200 (json)
{
  "configured": true,
  "helpReply": "Acme Plumbing: appointment texts. Call (212) 555-0142 or email help@acme.test. Reply STOP to opt out.",
  "object": "sms_settings",
  "updatedAt": "2026-11-05T10:00:00.000Z",
  "version": 0
}

Update SMS settings

patch/v1/settings/sms

Sets or clears the HELP auto-reply.

Sets helpReply — the text the platform sends back, from the number that got it, to a contact who texts HELP or INFO (beside STOP and START, which change consent): at most once per thread every 10 minutes, outside India only (an Indian SMS is a DLT template), never to a contact who opted out of SMS, billed as a service SMS. null stops replying. A compare-and-set on the SMS settings’ version (409 SETTINGS_VERSION_CONFLICT); 409 CHANNEL_NOT_CONFIGURED before the organization has SMS settings; audited against the key (messaging.sms_settings_updated); sending the value already set writes nothing. A test key is refused (422 TEST_MODE_UNSUPPORTED).

Access: an organization key with the settings:write scope.

Headers

  • Idempotency-Keystring

    Makes the request safe to retry: a repeat with the same key and the same body returns the stored success (with Idempotent-Replayed: true) instead of running again; a 4xx stores nothing. A 5xx is stored and replayed to every retry with the same key (Idempotent-Replayed: true): the first attempt may have taken effect, so check before retrying with a new key — except the errors that provably changed nothing (503 MESSAGING_TRANSPORT, 503 WHATSAPP_CONNECT_UNAVAILABLE; see https://trovacast.com/developers/idempotency), which store nothing, so a retry with the same key runs again. 1–255 visible ASCII characters; kept for 24 hours.

Request body

  • helpReplystring | null

    The HELP reply: 1–320 characters, no control characters except line breaks. Null stops replying.

    1–320 characters

  • versionintegerRequired

    The version you read.

    at least 1

Response 200PublicSmsSettings

  • configuredbooleanRequired

    False until the organization has SMS settings (set up in the console): nothing here can be set before.

  • helpReplystring | nullRequired

    What the platform texts back, from the number that got it, to a contact who texts HELP or INFO — once per thread every 10 minutes, outside India only, never to a contact who opted out of SMS; billed as a service SMS. US carriers expect it to name you and how to reach you, as your 10DLC campaign’s helpMessage does. Null: no reply is sent (the SMS provider’s own default reply, if its account has one, stands).

    at most 320 characters

  • objectstringRequired

    One ofsms_settings

  • updatedAtstring (date-time) | nullRequired

  • versionintegerRequired

    Pass back as version on PATCH: a compare-and-set on the SMS settings (409 SETTINGS_VERSION_CONFLICT when they moved). 0 while not configured.

    at least 0

Errors

Request
curl -X PATCH 'https://api.trovacast.com/v1/settings/sms' \
  -H "Authorization: Bearer $TROVACAST_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H 'Content-Type: application/json' \
  -d '{
  "version": 1
}'
Response 200 (json)
{
  "configured": true,
  "helpReply": "Acme Plumbing: appointment texts. Call (212) 555-0142 or email help@acme.test. Reply STOP to opt out.",
  "object": "sms_settings",
  "updatedAt": "2026-11-05T10:00:00.000Z",
  "version": 0
}

Get verify settings

get/v1/settings/verify

Reads whether one-time codes pass a marketing opt-out.

Off by default: /v1/verify refuses a code (422 VERIFY_RECIPIENT_OPTED_OUT) to a number whose contact opted out of the channel. Send version back on PATCH /v1/settings/verify.

Access: an organization key with the settings:read scope.

Response 200PublicVerifySettings

  • ignoreMarketingOptOutbooleanRequired

    Off (the default): a code is refused 422 VERIFY_RECIPIENT_OPTED_OUT to a number whose contact opted out of the channel — marketing included. On: a code passes a *marketing* opt-out (the person asked for the code; whether that may be sent is your compliance decision, under your country’s rules). A full opt-out of the channel — an SMS STOP, an unsubscribe — refuses a code either way.

  • objectstringRequired

    One ofverify_settings

  • updatedAtstring (date-time)Required

  • versionintegerRequired

    Pass back as version on PATCH: a compare-and-set on the organization (409 SETTINGS_VERSION_CONFLICT when it moved).

    at least 1

Errors

Request
curl 'https://api.trovacast.com/v1/settings/verify' \
  -H "Authorization: Bearer $TROVACAST_API_KEY"
Response 200 (json)
{
  "ignoreMarketingOptOut": true,
  "object": "verify_settings",
  "updatedAt": "2026-11-05T10:00:00.000Z",
  "version": 1
}

Update verify settings

patch/v1/settings/verify

Lets one-time codes pass a marketing opt-out, or not.

Your compliance decision: on, a code the person asked for reaches a number whose contact opted out of *marketing* on the channel; a full opt-out of the channel (an SMS STOP, an unsubscribe) still refuses it. A compare-and-set on the organization’s version (409 SETTINGS_VERSION_CONFLICT); audited against the key (organization.updated, before and after); sending the value already set writes nothing. A test key is refused (422 TEST_MODE_UNSUPPORTED).

Access: an organization key with the settings:write scope.

Headers

  • Idempotency-Keystring

    Makes the request safe to retry: a repeat with the same key and the same body returns the stored success (with Idempotent-Replayed: true) instead of running again; a 4xx stores nothing. A 5xx is stored and replayed to every retry with the same key (Idempotent-Replayed: true): the first attempt may have taken effect, so check before retrying with a new key — except the errors that provably changed nothing (503 MESSAGING_TRANSPORT, 503 WHATSAPP_CONNECT_UNAVAILABLE; see https://trovacast.com/developers/idempotency), which store nothing, so a retry with the same key runs again. 1–255 visible ASCII characters; kept for 24 hours.

Request body

  • ignoreMarketingOptOutbooleanRequired

    Let one-time codes pass a marketing opt-out (true) or not (false). A JSON boolean: the string "false" is refused, never read as true.

  • versionintegerRequired

    The version you read.

    at least 1

Response 200PublicVerifySettings

  • ignoreMarketingOptOutbooleanRequired

    Off (the default): a code is refused 422 VERIFY_RECIPIENT_OPTED_OUT to a number whose contact opted out of the channel — marketing included. On: a code passes a *marketing* opt-out (the person asked for the code; whether that may be sent is your compliance decision, under your country’s rules). A full opt-out of the channel — an SMS STOP, an unsubscribe — refuses a code either way.

  • objectstringRequired

    One ofverify_settings

  • updatedAtstring (date-time)Required

  • versionintegerRequired

    Pass back as version on PATCH: a compare-and-set on the organization (409 SETTINGS_VERSION_CONFLICT when it moved).

    at least 1

Errors

Request
curl -X PATCH 'https://api.trovacast.com/v1/settings/verify' \
  -H "Authorization: Bearer $TROVACAST_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H 'Content-Type: application/json' \
  -d '{
  "ignoreMarketingOptOut": true,
  "version": 1
}'
Response 200 (json)
{
  "ignoreMarketingOptOut": true,
  "object": "verify_settings",
  "updatedAt": "2026-11-05T10:00:00.000Z",
  "version": 1
}