API reference
Introspection
How these fit together: the Authentication guide.
Get me
get
Describes the API key making the request.
What the key is: its id, name, prefix and last four characters (never the secret), mode, expiry and scopes; for an organization key, the organization, the product lines it has (entitlements) and the integration that minted it, if any; for an integration key, the integration and the scopes delegated to it — and, sent with Trovacast-Organization, the organization it acts for (actingFor: the organization, its product lines and mode, and the scopes it holds there). The cheapest way to check a key before relying on it.
Access: any key, organization or integration.
Response 200MeResponse
Show the 9 fieldsHide the fields
actingForMeActingForINTEGRATION keys sent with
Trovacast-Organization: the organization the key acts for, and what it holds there.4 fields of
actingForentitlementsMeEntitlementsRequired2 fields of
entitlementscallingbooleanRequiredWhether the organization has calling.
messagingbooleanRequiredWhether the organization has messaging.
livemodebooleanRequiredFalse for a test organization (one a TEST integration key provisioned).
organizationMeOrganizationRequired2 fields of
organizationidstring (uuid)RequirednamestringRequired
scopesstring[]RequiredThe scopes the key holds acting for it.
One of
contacts:readcontacts:writecontacts:exportconsent:writetemplates:readtemplates:writemessages:readmessages:writebroadcasts:readbroadcasts:writeconversations:readconversations:writewhatsapp:readwhatsapp:manageemail:reademail:managesms:readsms:managedlt:readdlt:writewebhooks:managecalls:readcalls:writerecordings:readrecordings:writetranscripts:readnumbers:readnumbers:writelookup:readapplications:readapplications:writecall-flows:readcall-flows:writequeues:readqueues:writevoice:clientagents:readagents:writebilling:readbilling:manageverifications:readverifications:writeapi-keys:rotatesettings:readsettings:writeverify:readverify:writesubaccounts:readsubaccounts:writeteams:readmembers:read
entitlementsMeEntitlementsORG keys: the product lines the organization has.
2 fields of
entitlementscallingbooleanRequiredWhether the organization has calling.
messagingbooleanRequiredWhether the organization has messaging.
integrationMeIntegrationINTEGRATION keys: the integration the key belongs to.
4 fields of
integrationdelegatedScopesstring[]RequiredThe ORG scopes the platform delegated to the integration: what a key holding
organizations:actmay do acting for one of its organizations (Trovacast-Organization). Empty unless the platform delegated any.One of
contacts:readcontacts:writecontacts:exportconsent:writetemplates:readtemplates:writemessages:readmessages:writebroadcasts:readbroadcasts:writeconversations:readconversations:writewhatsapp:readwhatsapp:manageemail:reademail:managesms:readsms:managedlt:readdlt:writewebhooks:managecalls:readcalls:writerecordings:readrecordings:writetranscripts:readnumbers:readnumbers:writelookup:readapplications:readapplications:writecall-flows:readcall-flows:writequeues:readqueues:writevoice:clientagents:readagents:writebilling:readbilling:manageverifications:readverifications:writeapi-keys:rotatesettings:readsettings:writeverify:readverify:writesubaccounts:readsubaccounts:writeteams:readmembers:readidstring (uuid)RequirednamestringRequiredslugstringRequired
keyApiKeyIdentityRequired6 fields of
keyexpiresAtstring (date-time) | nullRequiredidstring (uuid)Requiredlast4stringRequiredmodestringRequiredTEST keys (
tc_test_…) reach only the sandboxes and are never billed.One of
LIVETESTnamestringRequiredprefixstringRequiredThe non-secret start of the key, as listed in the console.
kindstringRequiredORG: acts inside one organization. INTEGRATION: administers the organizations its integration provisioned.
One of
ORGINTEGRATIONlivemodebooleanRequiredFalse for a TEST key: the messages, calls and broadcasts it creates are
livemode: false.mintedByIntegrationMeMintedBy | nullORG keys: the integration that minted this key, if any.
2 fields of
mintedByIntegrationidstring (uuid)RequiredslugstringRequired
organizationMeOrganizationORG keys: the organization the key acts in.
2 fields of
organizationidstring (uuid)RequirednamestringRequired
scopesstring[]RequiredOne of
contacts:readcontacts:writecontacts:exportconsent:writetemplates:readtemplates:writemessages:readmessages:writebroadcasts:readbroadcasts:writeconversations:readconversations:writewhatsapp:readwhatsapp:manageemail:reademail:managesms:readsms:managedlt:readdlt:writewebhooks:managecalls:readcalls:writerecordings:readrecordings:writetranscripts:readnumbers:readnumbers:writelookup:readapplications:readapplications:writecall-flows:readcall-flows:writequeues:readqueues:writevoice:clientagents:readagents:writebilling:readbilling:manageverifications:readverifications:writeapi-keys:rotatesettings:readsettings:writeverify:readverify:writesubaccounts:readsubaccounts:writeteams:readmembers:readorganizations:readorganizations:writeorganizations:eraseorganizations:data-subjectsapi-keys:writeorganizations:actorganizations:events
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/me' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"actingFor": {
"entitlements": {
"calling": true,
"messaging": true
},
"livemode": true,
"organization": {
"id": "ID",
"name": "NAME"
},
"scopes": [
"contacts:read"
]
},
"entitlements": {
"calling": true,
"messaging": true
},
"integration": {
"delegatedScopes": [
"contacts:read"
],
"id": "ID",
"name": "NAME",
"slug": "shopify"
},
"key": {
"expiresAt": "2026-11-05T10:00:00.000Z",
"id": "ID",
"last4": "x9Yz",
"mode": "LIVE",
"name": "NAME",
"prefix": "tc_live_AbCd"
},
"kind": "ORG",
"livemode": true,
"mintedByIntegration": {
"id": "ID",
"slug": "shopify"
},
"organization": {
"id": "ID",
"name": "NAME"
},
"scopes": [
"contacts:read"
]
}List API key requests
get
Lists the requests this API key made in the last 7 days.
Newest first: method, route template, status, request id and latency of every request the key made once it authenticated (a request refused before the key was known — a bad key, the per-key rate limit — belongs to no key); an integration key sent with Trovacast-Organization, the requests it made acting for that organization. Never a body, a query string or the ids in a path. Rows appear a few seconds after the response and are kept 7 days.
Access: any key, organization or integration.
Query parameters
limitintegerHow many items to return.
cursorstringThe
nextCursorof the previous page. Omit for the first page.statusstringOnly requests answered with a status in this class.
One of
2xx3xx4xx5xx
Response 200ApiRequestPage
dataApiRequest[]Required8 fields of
datacreatedAtstring (date-time)RequireddurationMsintegerRequiredMilliseconds from authentication to the response.
idstring (uuid)RequiredmethodstringRequiredobjectstringRequiredOne of
api_requestrequestIdstring | nullRequiredThe
X-Request-Idit was answered with (andrequestIdof an error body): quote it to support.routestringRequiredThe route template the request matched — not its path.
statusintegerRequiredThe HTTP status it was answered.
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/me/requests' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"data": [
{
"createdAt": "2026-11-05T10:00:00.000Z",
"durationMs": 1,
"id": "ID",
"method": "POST",
"object": "api_request",
"requestId": "REQUEST_ID",
"route": "/v1/contacts/:contactId",
"status": 201
}
],
"nextCursor": "NEXT_CURSOR"
}Rotate API key
post
Rotates the API key making the request: a new secret now, this one valid for the overlap.
Needs the api-keys:rotate scope on the key itself (an integration key: api-keys:write, sent without Trovacast-Organization — 400 otherwise). The new key has the same name, scopes, mode and expiry; its secret is returned once. The calling key keeps working until previousKey.expiresAt (overlapHours, default 24, at most 168; 0 stops it now). A key already rotated answers 409 — rotate its replacement.
Access: any key, organization or integration.
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
overlapHoursintegerHow long the old secret keeps working, in hours (0: it stops now). At most 168 (a week).
0–168default 24
Response 201RotatedApiKey
Show the 17 fieldsHide the fields
createdAtstring (date-time)RequiredcreatedByApiKeyCreator | nullRequired4 fields of
createdBydisplayNamestringThe minting user (USER).
integrationIdstringThe minting integration (INTEGRATION).
integrationNamestringThe minting integration (INTEGRATION).
typestringRequiredOne of
USERINTEGRATION
expiresAtstring (date-time) | nullRequiredidstringRequiredkindstringRequiredOne of
ORGINTEGRATIONlast4stringRequiredlastUsedAtstring (date-time) | nullRequiredmodestringRequiredTEST keys reach only the sandboxes.
One of
LIVETESTnamestringRequiredprefixstringRequiredpreviousKeyRotatedPreviousKeyRequiredThe key it replaces, which keeps working until
expiresAt.4 fields of
previousKeyexpiresAtstring (date-time)RequiredWhen the old secret stops working.
idstring (uuid)Requiredlast4stringRequiredprefixstringRequired
revokedAtstring (date-time) | nullRequiredrotatedAtstring (date-time) | nullRequiredWhen the key was rotated. It keeps working until
expiresAt(the overlap), then stops.rotatedFromKeyIdstring (uuid) | nullRequiredThe key this one replaced, when a rotation minted it.
scopesstring[]RequiredsecretstringRequiredThe key itself. Returned only in this response and never stored — copy it now.
statusstringRequiredOne of
ACTIVEEXPIREDREVOKED
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.409CONFLICT — the key was already rotated (or changed meanwhile), or the live-key limit is reached. IDEMPOTENCY_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 POST 'https://api.trovacast.com/v1/me/rotate' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{}'{
"createdAt": "2026-11-05T10:00:00.000Z",
"createdBy": {
"displayName": "DISPLAY_NAME",
"integrationId": "INTEGRATION_ID",
"integrationName": "INTEGRATION_NAME",
"type": "USER"
},
"expiresAt": "2026-11-05T10:00:00.000Z",
"id": "ID",
"kind": "ORG",
"last4": "x9Yz",
"lastUsedAt": "2026-11-05T10:00:00.000Z",
"mode": "LIVE",
"name": "NAME",
"prefix": "tc_live_AbCd",
"previousKey": {
"expiresAt": "2026-11-05T10:00:00.000Z",
"id": "ID",
"last4": "x9Qz",
"prefix": "tc_live_AbCd"
},
"revokedAt": "2026-11-05T10:00:00.000Z",
"rotatedAt": "2026-11-05T10:00:00.000Z",
"rotatedFromKeyId": "ROTATED_FROM_KEY_ID",
"scopes": [
"SCOPES"
],
"secret": "tc_live_AbCd…",
"status": "ACTIVE"
}