API reference
Voice applications
How these fit together: the Inbound calls guide.
List applications
get
Lists voice applications, newest first.
Every voice application of the organization, newest first. Only the signing secret’s last four characters are listed (secretLast4); livemode: false marks one a test key made, which answers test calls only.
Access: an organization key with the applications:read scope.
Query parameters
limitintegerHow many items to return.
cursorstringThe
nextCursorof the previous page. Omit for the first page.
Response 200PublicApplicationPage
dataPublicApplication[]RequiredIts fields are listed under Get application
nextCursorstring | nullRequiredPass back as
cursorfor the next page; null on the last.
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.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/applications' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"data": [
{
"answerUrl": "ANSWER_URL",
"createdAt": "2026-11-05T10:00:00.000Z",
"fallbackFlowId": "FALLBACK_FLOW_ID",
"fallbackUrl": "FALLBACK_URL",
"id": "ID",
"livemode": true,
"name": "NAME",
"object": "voice_application",
"payloadVersion": 1,
"secretLast4": "a1B2",
"timeoutMs": 1,
"updatedAt": "2026-11-05T10:00:00.000Z",
"version": 1
}
],
"nextCursor": "NEXT_CURSOR"
}Create application
post
Creates a voice application (its signing secret is shown once).
answerUrl — and fallbackUrl, asked once when the answer URL fails — must be https on a public host and a port the platform calls, checked now and again on every request. Each request is a JSON POST signed with the application’s secret (Trovacast-Signature, the webhook scheme), returned in this response only, as secret. Refused with 409 VOICE_APPLICATION_NAME_TAKEN for a name another application has; a test key’s application is a test one (livemode: false). Audited against the key (desk.voice_application.create).
Access: an organization key with the applications: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
answerUrlstringRequiredAsked for call instructions (a JSON document of verbs) when a call to a number routed here is answered, and when a
/v1/callsFLOW call names the application. https on a public host and a web or unprivileged port, checked now and on every request.at most 2048 characters
fallbackFlowIdstring (uuid) | nullT9: a published call flow of yours (of this key’s mode) the call runs when neither the answer URL nor
fallbackUrlgives usable instructions — your own routing (ring a phone, take a message) while your server is down, instead of the apology. The call’s timeline says so (application.fallback).fallbackUrlstring | nullAsked once when the answer URL fails (no answer in time, an error status, an invalid document). Without one — or when it fails too — the call runs
fallbackFlowId, or the caller hears an apology and the call ends.at most 2048 characters
namestringRequiredat most 120 characters
payloadVersionintegerThe shape of the request the platform sends your answer and fallback URLs (and branch URLs):
2—callreads as the call resource does (fromthe calling number andtothe number dialled whichever way the call goes, so on an outbound callfromis your caller ID andtothe contact masked•••• ••3210; lowercasedirection;livemode,numberId,contactId), withlivemodeon the request too — or1(deprecated, removed after 2027-02-08):call.fromis the contact{ contactId, last4 }whichever way the call goes,call.tothe business number,directionuppercase. Every request carriesversion. An application made before 2026-11-06 22:35 UTC (when payload 2 shipped) is on1until you switch it.One of
12default 2
timeoutMsintegerMilliseconds each request may take, connection to last byte (at most 4 s).
1000–4000default 4000
Response 201PublicApplicationWithSecret
Show the 14 fieldsHide the fields
answerUrlstringRequiredcreatedAtstring (date-time)RequiredfallbackFlowIdstring (uuid) | nullRequiredT9: the call flow a call runs when neither URL gives usable instructions; null: the caller hears an apology.
fallbackUrlstring | nullRequiredidstring (uuid)RequiredlivemodebooleanRequiredfalse when a test key created it: it answers test calls only — never a live call or a number — and test keys may change it. A live application is read-only to a test key.
namestringRequiredobjectstringRequiredOne of
voice_applicationpayloadVersionintegerRequiredThe shape of the request the platform sends your answer and fallback URLs (and branch URLs):
2—callreads as the call resource does (fromthe calling number andtothe number dialled whichever way the call goes, so on an outbound callfromis your caller ID andtothe contact masked•••• ••3210; lowercasedirection;livemode,numberId,contactId), withlivemodeon the request too — or1(deprecated, removed after 2027-02-08):call.fromis the contact{ contactId, last4 }whichever way the call goes,call.tothe business number,directionuppercase. Every request carriesversion. An application made before 2026-11-06 22:35 UTC (when payload 2 shipped) is on1until you switch it.One of
12secretstringRequiredThe signing secret (
Trovacast-Signatureon every request to your URLs, the webhook scheme). Shown in this response only — store it now.secretLast4stringRequiredThe signing secret’s last four characters. The secret itself is shown only when the application is created and when it is rotated.
timeoutMsintegerRequiredupdatedAtstring (date-time)RequiredversionintegerRequiredBumped on every change; send it back to update safely.
Errors
400VALIDATION_FAILED — a URL the platform will not call (not https, not a public host, a refused port).401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.409VOICE_APPLICATION_NAME_TAKEN; or IDEMPOTENCY_KEY_IN_FLIGHT.422IDEMPOTENCY_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/applications' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"name": "Support line",
"answerUrl": "https://voice.example.com/answer",
"fallbackUrl": "https://voice.example.com/fallback",
"timeoutMs": 3000
}'{
"answerUrl": "ANSWER_URL",
"createdAt": "2026-11-05T10:00:00.000Z",
"fallbackFlowId": "FALLBACK_FLOW_ID",
"fallbackUrl": "FALLBACK_URL",
"id": "ID",
"livemode": true,
"name": "NAME",
"object": "voice_application",
"payloadVersion": 1,
"secret": "whsec_…",
"secretLast4": "a1B2",
"timeoutMs": 1,
"updatedAt": "2026-11-05T10:00:00.000Z",
"version": 1
}Get application
get
Retrieves a voice application.
Its URLs, timeoutMs and version. The signing secret is never returned again — secretLast4 only; POST /v1/applications/{applicationId}/rotate-secret mints a new one.
Access: an organization key with the applications:read scope.
Path parameters
applicationIdstringRequired
Response 200PublicApplication
Show the 13 fieldsHide the fields
answerUrlstringRequiredcreatedAtstring (date-time)RequiredfallbackFlowIdstring (uuid) | nullRequiredT9: the call flow a call runs when neither URL gives usable instructions; null: the caller hears an apology.
fallbackUrlstring | nullRequiredidstring (uuid)RequiredlivemodebooleanRequiredfalse when a test key created it: it answers test calls only — never a live call or a number — and test keys may change it. A live application is read-only to a test key.
namestringRequiredobjectstringRequiredOne of
voice_applicationpayloadVersionintegerRequiredThe shape of the request the platform sends your answer and fallback URLs (and branch URLs):
2—callreads as the call resource does (fromthe calling number andtothe number dialled whichever way the call goes, so on an outbound callfromis your caller ID andtothe contact masked•••• ••3210; lowercasedirection;livemode,numberId,contactId), withlivemodeon the request too — or1(deprecated, removed after 2027-02-08):call.fromis the contact{ contactId, last4 }whichever way the call goes,call.tothe business number,directionuppercase. Every request carriesversion. An application made before 2026-11-06 22:35 UTC (when payload 2 shipped) is on1until you switch it.One of
12secretLast4stringRequiredThe signing secret’s last four characters. The secret itself is shown only when the application is created and when it is rotated.
timeoutMsintegerRequiredupdatedAtstring (date-time)RequiredversionintegerRequiredBumped on every change; send it back to update safely.
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.404NOT_FOUND — no such application.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/applications/APPLICATION_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"answerUrl": "ANSWER_URL",
"createdAt": "2026-11-05T10:00:00.000Z",
"fallbackFlowId": "FALLBACK_FLOW_ID",
"fallbackUrl": "FALLBACK_URL",
"id": "ID",
"livemode": true,
"name": "NAME",
"object": "voice_application",
"payloadVersion": 1,
"secretLast4": "a1B2",
"timeoutMs": 1,
"updatedAt": "2026-11-05T10:00:00.000Z",
"version": 1
}Update application
patch
Changes a voice application.
Only the fields sent change (fallbackUrl: null removes the fallback); new URLs pass the same checks as on create. Send the version you read for a compare-and-set (409 VOICE_APPLICATION_VERSION_CONFLICT when it moved; omitted, last write wins); a taken name is 409 VOICE_APPLICATION_NAME_TAKEN. A test key may change only test applications (422 TEST_MODE_UNSUPPORTED). Audited against the key (desk.voice_application.update).
Access: an organization key with the applications:write scope.
Path parameters
applicationIdstringRequired
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
answerUrlstringat most 2048 characters
fallbackFlowIdstring (uuid) | nullT9: the call flow a call runs when the application cannot answer; null removes it (the apology again).
fallbackUrlstring | nullat most 2048 characters
namestringat most 120 characters
payloadVersionintegerSwitches the answer-URL request shape (see
payloadVersionon create). Move an application made before 2026-11-06 22:35 UTC to2once your handler reads it;1is removed after 2027-02-08.One of
12timeoutMsinteger1000–4000
versionintegerThe
versionyou read: the change applies only if nobody changed the application since (409 VOICE_APPLICATION_VERSION_CONFLICT). Omitted: last write wins.
Response 200PublicApplication
Its fields are listed under Get application.
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.404NOT_FOUND — no such application.409VOICE_APPLICATION_VERSION_CONFLICT (versionmoved; read it again), VOICE_APPLICATION_NAME_TAKEN; or IDEMPOTENCY_KEY_IN_FLIGHT.422TEST_MODE_UNSUPPORTED — a TEST key changing a live application (it may change only test applications). 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 PATCH 'https://api.trovacast.com/v1/applications/APPLICATION_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{}'{
"answerUrl": "ANSWER_URL",
"createdAt": "2026-11-05T10:00:00.000Z",
"fallbackFlowId": "FALLBACK_FLOW_ID",
"fallbackUrl": "FALLBACK_URL",
"id": "ID",
"livemode": true,
"name": "NAME",
"object": "voice_application",
"payloadVersion": 1,
"secretLast4": "a1B2",
"timeoutMs": 1,
"updatedAt": "2026-11-05T10:00:00.000Z",
"version": 1
}Delete application
delete
Deletes a voice application.
Deletes it outright (applications are not archived). Refused with 409 VOICE_APPLICATION_IN_USE while a number routes its inbound calls to it — re-route the number with PATCH /v1/numbers/{numberId} first; a test key may delete only test applications (422 TEST_MODE_UNSUPPORTED). Audited against the key (desk.voice_application.delete).
Access: an organization key with the applications:write scope.
Path parameters
applicationIdstringRequired
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 204
Deleted.
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.404NOT_FOUND — no such application.409VOICE_APPLICATION_IN_USE — numbers still route to it (re-route them first); or IDEMPOTENCY_KEY_IN_FLIGHT.422TEST_MODE_UNSUPPORTED — a TEST key changing a live application (it may change only test applications). 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 DELETE 'https://api.trovacast.com/v1/applications/APPLICATION_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"Answers 204 with no body.
Rotate application secret
post
Rotates an application’s signing secret (the new one is shown once).
Returns the new secret once, as secret; the previous one stops signing at once, so every request after this one carries the new signature in Trovacast-Signature. A test key may rotate only test applications (422 TEST_MODE_UNSUPPORTED). Audited against the key (desk.voice_application.rotate_secret).
Access: an organization key with the applications:write scope.
Path parameters
applicationIdstringRequired
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 200PublicApplicationWithSecret
Show the 14 fieldsHide the fields
answerUrlstringRequiredcreatedAtstring (date-time)RequiredfallbackFlowIdstring (uuid) | nullRequiredT9: the call flow a call runs when neither URL gives usable instructions; null: the caller hears an apology.
fallbackUrlstring | nullRequiredidstring (uuid)RequiredlivemodebooleanRequiredfalse when a test key created it: it answers test calls only — never a live call or a number — and test keys may change it. A live application is read-only to a test key.
namestringRequiredobjectstringRequiredOne of
voice_applicationpayloadVersionintegerRequiredThe shape of the request the platform sends your answer and fallback URLs (and branch URLs):
2—callreads as the call resource does (fromthe calling number andtothe number dialled whichever way the call goes, so on an outbound callfromis your caller ID andtothe contact masked•••• ••3210; lowercasedirection;livemode,numberId,contactId), withlivemodeon the request too — or1(deprecated, removed after 2027-02-08):call.fromis the contact{ contactId, last4 }whichever way the call goes,call.tothe business number,directionuppercase. Every request carriesversion. An application made before 2026-11-06 22:35 UTC (when payload 2 shipped) is on1until you switch it.One of
12secretstringRequiredThe signing secret (
Trovacast-Signatureon every request to your URLs, the webhook scheme). Shown in this response only — store it now.secretLast4stringRequiredThe signing secret’s last four characters. The secret itself is shown only when the application is created and when it is rotated.
timeoutMsintegerRequiredupdatedAtstring (date-time)RequiredversionintegerRequiredBumped on every change; send it back to update safely.
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.404NOT_FOUND — no such application.409IDEMPOTENCY_KEY_IN_FLIGHT — the first request with this Idempotency-Key is still running (retry afterRetry-After); or CONFLICT.422TEST_MODE_UNSUPPORTED — a TEST key changing a live application (it may change only test applications). 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/applications/APPLICATION_ID/rotate-secret' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"answerUrl": "ANSWER_URL",
"createdAt": "2026-11-05T10:00:00.000Z",
"fallbackFlowId": "FALLBACK_FLOW_ID",
"fallbackUrl": "FALLBACK_URL",
"id": "ID",
"livemode": true,
"name": "NAME",
"object": "voice_application",
"payloadVersion": 1,
"secret": "whsec_…",
"secretLast4": "a1B2",
"timeoutMs": 1,
"updatedAt": "2026-11-05T10:00:00.000Z",
"version": 1
}