API reference
Phones
List phones
get
Lists the organization’s own phones — the staff handsets its calls may be forwarded to.
Every phone registered with POST /v1/phones, oldest first, in one page (nextCursor is always null). Numbers are masked to their last four digits; tell phones apart by the reference and label you gave them.
Access: an organization key with the settings:read scope.
Response 200PublicPhonePage
dataPublicPhone[]RequiredIts fields are listed under Get phone
nextCursorstring | nullRequiredAlways null: every phone is in one page.
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403ENTITLEMENT_CALLING_DISABLED — the organization does not have calling; API_KEY_SCOPE_MISSING (settings:read).429RATE_LIMITED — retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault; retry with backoff (with the same Idempotency-Key on a write).
curl 'https://api.trovacast.com/v1/phones' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"data": [
{
"country": "US",
"createdAt": "2026-11-05T10:00:00.000Z",
"id": "ID",
"label": "Sam’s mobile",
"number": "•••• ••0142",
"object": "phone",
"reference": "staff_8f2c",
"updatedAt": "2026-11-05T10:00:00.000Z"
}
],
"nextCursor": "NEXT_CURSOR"
}Register phone
post
Registers a staff handset as one of the organization’s own phones.
Declares number as a handset your own staff answer. From then on a leg a call flow’s connect, or a transfer, dials to that number is your staff answering their own phone, not a called party: the called party’s calling window (the +1 TCPA window, DESTINATION_CALLING_WINDOW_CLOSED) is not asked of it. It is still a number you dial: it must be one the organization may call — refused with the destination policy’s own code otherwise (422 DESTINATION_BLOCKED, DESTINATION_ACKNOWLEDGEMENT_REQUIRED, DESTINATION_NOT_PRICED) — and every dial to it is priced and asked again. One phone per number: registering a number again updates its label and reference and answers the same phone. Refused 400 OWN_PHONE_IS_CARRIER_NUMBER for one of your own business numbers (nothing would answer it) and 409 OWN_PHONE_LIMIT_REACHED at the limit. Register only handsets of your own staff: a customer’s number registered here would be called outside the hours the law allows, and the registration is audited. A test key registers test phones: a separate list only test keys read, asked only of test calls.
Access: an organization key with the settings:write scope.
Headers
Idempotency-KeystringMakes 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
labelstringWhat you call it. Never read by a rule.
at most 120 characters
numberstringRequiredThe handset, in international format. Stored encrypted and shown masked afterwards.
referencestringYour own id for whoever holds the phone, echoed back on the resource. Not personal data: it is stored in clear.
at most 200 characters
Response 201PublicPhone
Its fields are listed under Get phone.
Errors
400VALIDATION_FAILED —numberis not a phone number in international format; OWN_PHONE_IS_CARRIER_NUMBER.401API_KEY_INVALID — missing, unknown, revoked or expired key.403ENTITLEMENT_CALLING_DISABLED; API_KEY_SCOPE_MISSING (settings:write).409OWN_PHONE_LIMIT_REACHED; or IDEMPOTENCY_KEY_IN_FLIGHT.422DESTINATION_BLOCKED, DESTINATION_ACKNOWLEDGEMENT_REQUIRED or DESTINATION_NOT_PRICED — the organization may not dial that number; or IDEMPOTENCY_KEY_REUSED.429RATE_LIMITED — retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault. With an Idempotency-Key, every retry with that key replays this answer (Idempotent-Replayed: true).
curl -X POST 'https://api.trovacast.com/v1/phones' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"label": "Sam’s mobile",
"number": "+12125550142",
"reference": "staff_8f2c"
}'{
"country": "US",
"createdAt": "2026-11-05T10:00:00.000Z",
"id": "ID",
"label": "Sam’s mobile",
"number": "•••• ••0142",
"object": "phone",
"reference": "staff_8f2c",
"updatedAt": "2026-11-05T10:00:00.000Z"
}Get phone
get
Reads one of the organization’s own phones.
The phone as GET /v1/phones lists it. 404 for an id that is not one of this organization’s phones.
Access: an organization key with the settings:read scope.
Path parameters
phoneIdstringRequired
Response 200PublicPhone
countrystringRequiredISO 3166-1 alpha-2.
createdAtstring (date-time)Requiredidstring (uuid)Requiredlabelstring | nullRequirednumberstringRequiredThe number, masked to its last four digits.
objectstringRequiredOne of
phonereferencestring | nullRequiredupdatedAtstring (date-time)Required
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403ENTITLEMENT_CALLING_DISABLED; API_KEY_SCOPE_MISSING (settings:read).404NOT_FOUND — no such phone.429RATE_LIMITED — retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault; retry with backoff (with the same Idempotency-Key on a write).
curl 'https://api.trovacast.com/v1/phones/PHONE_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"country": "US",
"createdAt": "2026-11-05T10:00:00.000Z",
"id": "ID",
"label": "Sam’s mobile",
"number": "•••• ••0142",
"object": "phone",
"reference": "staff_8f2c",
"updatedAt": "2026-11-05T10:00:00.000Z"
}Remove phone
delete
Removes one of the organization’s own phones.
Takes the phone off the list: a leg dialled to its number afterwards is a called party’s again, held to every rule of one. Calls already ringing or connected are not touched. Audited. 404 for an id that is not one of this organization’s phones (a phone removed already included).
Access: an organization key with the settings:write scope.
Path parameters
phoneIdstringRequired
Headers
Idempotency-KeystringMakes 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 200PublicPhoneDeleted
deletedbooleanRequiredOne of
trueidstring (uuid)RequiredobjectstringRequiredOne of
phone
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403ENTITLEMENT_CALLING_DISABLED; API_KEY_SCOPE_MISSING (settings:write).404NOT_FOUND — no such phone.409IDEMPOTENCY_KEY_IN_FLIGHT — the first request with this Idempotency-Key is still running (retry afterRetry-After); or CONFLICT.422IDEMPOTENCY_KEY_REUSED — this Idempotency-Key was used for a different request.429RATE_LIMITED — retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault. With an Idempotency-Key, every retry with that key replays this answer (Idempotent-Replayed: true).
curl -X DELETE 'https://api.trovacast.com/v1/phones/PHONE_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"deleted": true,
"id": "ID",
"object": "phone"
}