API reference
Organizations
How these fit together: the Integration keys guide.
List organizations
get
Finds the organization you provisioned for an externalReference (zero or one).
A lookup, not a listing: externalReference is required, and the page holds zero or one organization. Only organizations this integration provisioned are searched, so another integration’s organization with the same reference is never found.
Access: an integration key with the organizations:read scope.
Query parameters
externalReferencestringRequiredThe reference you provisioned the organization with (exact match). Only your own organizations are searched.
Response 200PublicOrganizationPage
dataPublicOrganization[]Requiredat most 1 items
Its fields are listed under Get organization
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/organizations?externalReference=acme.myshopify.com' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"data": [
{
"billing": {
"payer": "organization",
"spend": {
"amountMinor": 182350,
"periodEnd": "2026-11-05T10:00:00.000Z",
"periodStart": "2026-11-05T10:00:00.000Z"
},
"spendCap": {
"amountMinor": 500000,
"period": "month"
}
},
"country": "IN",
"createdAt": "2026-11-05T10:00:00.000Z",
"entitlements": {
"calling": true,
"messaging": true
},
"erasure": {
"requestedAt": "2026-11-05T10:00:00.000Z",
"status": "erasing"
},
"externalReference": "acme.myshopify.com",
"id": "ID",
"livemode": true,
"name": "NAME",
"object": "organization",
"planId": "PLAN_ID",
"slug": "SLUG",
"status": "active",
"suspendedAt": "2026-11-05T10:00:00.000Z",
"suspendedBy": "integration",
"whatsapp": {
"status": "not_connected"
}
}
],
"nextCursor": "NEXT_CURSOR"
}Create organization
post
Provisions an organization for a customer (idempotent on externalReference).
An organization with the product lines asked for (entitlements, messaging only by default), on the plan asked for (planId, your integration’s default plan by default) — each within your integration’s terms: its partner’s ceilings and plan list when the platform bound it to one, else messaging on the default plan (409 PRODUCT_LINE_NOT_OFFERED, 409 PLAN_NOT_OFFERED) — in country (the deployment’s home country by default), paid for as billing says (its own wallet by default; payer: integration debits your integration’s billing organization’s wallet instead, under an optional monthly spendCap — 409 BILLING_PAYER_NOT_CONFIGURED until the platform set that organization), with a first team and ownerEmail seated as an invited administrator — no invitation email is sent. When the platform requires your integration’s organizations to pass business verification, their live features wait for it, as a self-serve signup’s do. 201 when it was created; 200 with the existing organization when this integration already provisioned one for externalReference, whatever else the body says (concurrent requests make one). Audited against the key (organization.provisioned). Refused with 409 ORGANIZATION_ERASING while that organization is being erased (provision it again once the erasure finishes).
Access: an integration key with the organizations: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
billingPublicOrganizationBillingInputWho pays its charges, and the cap on what you pay for it. Default: its own wallet. A test organization keeps the setting and is never billed.
2 fields of
billingpayerstringRequiredintegration: its usage and fees debit your integration’s billing organization’s wallet (set by the platform —409 BILLING_PAYER_NOT_CONFIGUREDuntil it is), each attributed to it;organization: its own wallet, as before.One of
organizationintegrationspendCapPublicSpendCapInput | nullWith
payer: integrationonly: the monthly cap on what you pay for it — a dial, send or number that would pass it is refused402 BILLING_SPEND_CAP_REACHED(plan fees and number renewals are charged and count toward it). Omitted or null: no cap.2 fields of
spendCapamountMinorintegerRequiredThe most the organization’s usage and fees may take, net, from your billing organization’s wallet in a UTC calendar month (minor units).
1–2000000000
periodstringRequiredA UTC calendar month.
One of
month
countrystringISO 3166-1 alpha-2 country of the business: the default country of its business verification. Default: the deployment’s home country.
entitlementsPublicOrganizationEntitlementsInputThe product lines it starts with, within your integration’s terms (its partner’s ceilings, or messaging only for an integration bound to no partner — else
409 PRODUCT_LINE_NOT_OFFERED). Default: messaging only.2 fields of
entitlementscallingbooleanRequiredCalls: numbers, inbound and
/v1/calls.messagingbooleanRequiredMessages: WhatsApp, SMS and email.
externalReferencestringRequiredYour id for the customer (the Shopify app: the shop’s myshopify domain). One organization per value.
at most 255 characters
localestringdefault "en-IN"
namestringRequired2–120 characters
ownerEmailstringRequiredSeated as an invited administrator. No email is sent until they claim the seat.
planIdstring (uuid)A plan your integration may give (on its partner’s list, or its default plan — else
409 PLAN_NOT_OFFERED). Default: your integration’s default plan.timezonestringRequiredIANA time zone.
Response 200PublicOrganization
Already provisioned for this externalReference.
Its fields are listed under Get organization.
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.409ORGANIZATION_ERASING — the organization this integration provisioned forexternalReferenceis being erased (provision it again once the erasure finishes); PRODUCT_LINE_NOT_OFFERED (line) — a product line outside your integration’s terms; PLAN_NOT_OFFERED — a plan your integration may not give; BILLING_PAYER_NOT_CONFIGURED —billing.payer: integrationbefore the platform set your integration’s billing organization; CONFLICT — your integration has no active plan to provision on, or your partner is not active; or IDEMPOTENCY_KEY_IN_FLIGHT.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/organizations' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"name": "Acme Store",
"externalReference": "acme.myshopify.com",
"ownerEmail": "owner@acme.example",
"timezone": "Asia/Kolkata"
}'{
"billing": {
"payer": "organization",
"spend": {
"amountMinor": 182350,
"periodEnd": "2026-11-05T10:00:00.000Z",
"periodStart": "2026-11-05T10:00:00.000Z"
},
"spendCap": {
"amountMinor": 500000,
"period": "month"
}
},
"country": "IN",
"createdAt": "2026-11-05T10:00:00.000Z",
"entitlements": {
"calling": true,
"messaging": true
},
"erasure": {
"requestedAt": "2026-11-05T10:00:00.000Z",
"status": "erasing"
},
"externalReference": "acme.myshopify.com",
"id": "ID",
"livemode": true,
"name": "NAME",
"object": "organization",
"planId": "PLAN_ID",
"slug": "SLUG",
"status": "active",
"suspendedAt": "2026-11-05T10:00:00.000Z",
"suspendedBy": "integration",
"whatsapp": {
"status": "not_connected"
}
}Get organization
get
An organization’s lifecycle, product lines and WhatsApp connection status.
Identity, status (and who holds a suspension: suspendedBy), product lines (entitlements), plan, country, whether WhatsApp is connected and, while one runs, the erasure’s state — never the organization’s own data. Once an erasure completes the organization is gone and this answers 404.
Access: an integration key with the organizations:read scope.
Path parameters
organizationIdstringRequired
Response 200PublicOrganization
Show the 16 fieldsHide the fields
billingPublicOrganizationBillingRequiredWho pays its usage and fees (
payer): its own wallet, or your integration’s billing organization’s — with the monthly cap on what you pay for it and this month’s spend.3 fields of
billingpayerstringRequiredorganization: its own wallet.integration: the wallet of the billing organization the platform set for the integration that provisioned it — each charge debits that wallet, attributed to this organization, and its own wallet is not spent.One of
organizationintegrationspendPublicSpend | nullRequiredWhile the integration pays: what this month has taken from it so far; null otherwise.
3 fields of
spendamountMinorintegerRequiredNet: charges less what was credited back (a refunded message, a re-rated call), as posted this month.
periodEndstring (date-time)RequiredExclusive.
periodStartstring (date-time)RequiredThe month’s start (UTC).
spendCapPublicSpendCap | nullRequiredWhile the integration pays: the monthly cap on what it pays (dials, sends and numbers past it are refused
402 BILLING_SPEND_CAP_REACHED); null for none.2 fields of
spendCapamountMinorintegerRequiredThe most its usage and fees may take, net, from the paying account in a month (minor units of the currency).
at least 1
periodstringRequiredA UTC calendar month.
One of
month
countrystring | nullRequiredISO 3166-1 alpha-2: the country you provisioned it in (null for one provisioned before the field existed).
createdAtstring (date-time)RequiredentitlementsPublicOrganizationEntitlementsRequired2 fields of
entitlementscallingbooleanRequiredmessagingbooleanRequired
erasurePublicOrganizationErasureState | nullRequiredSet while
DELETE /v1/organizations/{id}is in flight; a 404 afterwards means the erasure finished.2 fields of
erasurerequestedAtstring (date-time)RequiredstatusstringRequiredOne of
erasingfailed
externalReferencestring | nullRequiredidstring (uuid)RequiredlivemodebooleanRequiredFalse for a test organization: one a TEST integration key provisioned, reached by your TEST keys only, never billed and never live.
namestringRequiredobjectstringRequiredOne of
organizationplanIdstring (uuid) | nullRequiredThe plan the organization is enrolled on (null only before it was ever enrolled).
slugstringRequiredstatusstringRequiredOne of
activesuspendedclosedsuspendedAtstring (date-time) | nullRequiredsuspendedBystring | nullRequiredWho holds the suspension. An integration may lift only its own (
integration).One of
integrationplatformpartnerwhatsappPublicOrganizationWhatsAppRequired1 field of
whatsappstatusstringRequiredOne of
not_connectedconnectedneeds_attentiondisconnected
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 organization among those this integration provisioned.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/organizations/ORGANIZATION_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"billing": {
"payer": "organization",
"spend": {
"amountMinor": 182350,
"periodEnd": "2026-11-05T10:00:00.000Z",
"periodStart": "2026-11-05T10:00:00.000Z"
},
"spendCap": {
"amountMinor": 500000,
"period": "month"
}
},
"country": "IN",
"createdAt": "2026-11-05T10:00:00.000Z",
"entitlements": {
"calling": true,
"messaging": true
},
"erasure": {
"requestedAt": "2026-11-05T10:00:00.000Z",
"status": "erasing"
},
"externalReference": "acme.myshopify.com",
"id": "ID",
"livemode": true,
"name": "NAME",
"object": "organization",
"planId": "PLAN_ID",
"slug": "SLUG",
"status": "active",
"suspendedAt": "2026-11-05T10:00:00.000Z",
"suspendedBy": "integration",
"whatsapp": {
"status": "not_connected"
}
}Update organization
patch
Renames an organization, switches its product lines or moves its plan, within your terms.
Any of name, entitlements (both lines, as they should be), planId and billing (who pays, and the monthly cap on what your integration pays — from the next charge on; 409 BILLING_PAYER_NOT_CONFIGURED for payer: integration until the platform set your billing organization); at least one. Lines and plans must be within your integration’s terms — its partner’s ceilings and plan list when the platform bound it to one, else messaging on your default plan — checked for everything asked before anything changes (409 PRODUCT_LINE_NOT_OFFERED with line, 409 PLAN_NOT_OFFERED); switching a line off is always allowed. A new plan’s period starts now: its fee is charged and the unused share of the old one credited back. The same values again change nothing. Each change is audited against the key (organization.updated, organization.entitlements_changed, billing.subscription.plan_changed). A closed organization is 409 ORGANIZATION_CLOSED.
Access: an integration key with the organizations:write scope.
Path parameters
organizationIdstringRequired
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
billingPublicOrganizationBillingInputWho pays its charges, as it should be (
payer, andspendCap— omitted or null for none). Takes effect for charges posted from then on: a refund or re-rating of an earlier charge goes back to the wallet that paid it. Moving tointegrationends its own wallet’s say (a past-due plan fee no longer holds it; the integration’s standing does); moving back, its own wallet decides again.2 fields of
billingpayerstringRequiredintegration: its usage and fees debit your integration’s billing organization’s wallet (set by the platform —409 BILLING_PAYER_NOT_CONFIGUREDuntil it is), each attributed to it;organization: its own wallet, as before.One of
organizationintegrationspendCapPublicSpendCapInput | nullWith
payer: integrationonly: the monthly cap on what you pay for it — a dial, send or number that would pass it is refused402 BILLING_SPEND_CAP_REACHED(plan fees and number renewals are charged and count toward it). Omitted or null: no cap.2 fields of
spendCapamountMinorintegerRequiredThe most the organization’s usage and fees may take, net, from your billing organization’s wallet in a UTC calendar month (minor units).
1–2000000000
periodstringRequiredA UTC calendar month.
One of
month
entitlementsPublicOrganizationEntitlementsInputBoth product lines, as they should be: switching one off is always allowed; one on must be within your integration’s terms (
409 PRODUCT_LINE_NOT_OFFERED).2 fields of
entitlementscallingbooleanRequiredCalls: numbers, inbound and
/v1/calls.messagingbooleanRequiredMessages: WhatsApp, SMS and email.
namestring2–120 characters
planIdstring (uuid)Moves it to a plan your integration may give (
409 PLAN_NOT_OFFEREDotherwise). The new plan’s period starts now: its fee is charged and the unused share of the old one credited back, as a plan change in the console is.
Response 200PublicOrganization
Its fields are listed under Get organization.
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 organization among those this integration provisioned.409PRODUCT_LINE_NOT_OFFERED (line); PLAN_NOT_OFFERED; BILLING_PAYER_NOT_CONFIGURED; ORGANIZATION_CLOSED; CONFLICT — it changed meanwhile (read it again and retry); IDEMPOTENCY_KEY_IN_FLIGHT.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 PATCH 'https://api.trovacast.com/v1/organizations/ORGANIZATION_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"name": "Acme Store"
}'{
"billing": {
"payer": "organization",
"spend": {
"amountMinor": 182350,
"periodEnd": "2026-11-05T10:00:00.000Z",
"periodStart": "2026-11-05T10:00:00.000Z"
},
"spendCap": {
"amountMinor": 500000,
"period": "month"
}
},
"country": "IN",
"createdAt": "2026-11-05T10:00:00.000Z",
"entitlements": {
"calling": true,
"messaging": true
},
"erasure": {
"requestedAt": "2026-11-05T10:00:00.000Z",
"status": "erasing"
},
"externalReference": "acme.myshopify.com",
"id": "ID",
"livemode": true,
"name": "NAME",
"object": "organization",
"planId": "PLAN_ID",
"slug": "SLUG",
"status": "active",
"suspendedAt": "2026-11-05T10:00:00.000Z",
"suspendedBy": "integration",
"whatsapp": {
"status": "not_connected"
}
}Erase organization
delete
Erases an organization the integration provisioned.
Closes the organization and revokes its API keys at once, then — in the background — disconnects WhatsApp, deletes stored credentials, media and recordings, erases every contact and deletes the organization. Idempotent while it runs (202 again); a repeat after a failed run starts it again. Once it completes the organization is gone and requests naming it answer 404.
Access: an integration key with the organizations:erase scope.
Path parameters
organizationIdstring (uuid)Required
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. This endpoint converges when run again, so a 5xx stores nothing either: a retry with the same key runs it again. 1–255 visible ASCII characters; kept for 24 hours.
Response 202OrganizationErasure
objectstringRequiredOne of
organization_erasureorganizationIdstring (uuid)RequiredrequestedAtstring (date-time)RequiredWhen the erasure was first requested.
statusstringRequiredAlways
erasing: the work runs in the background. Once it completes the organization no longer exists, and every request naming it answers 404.One of
erasing
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 resource for this key (another organization’s id is answered the same way).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; retry with backoff (with the same Idempotency-Key on a write).
curl -X DELETE 'https://api.trovacast.com/v1/organizations/ORGANIZATION_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"object": "organization_erasure",
"organizationId": "ORGANIZATION_ID",
"requestedAt": "2026-11-05T10:00:00.000Z",
"status": "erasing"
}Create organization API key
post
Mints an organization API key; the secret is returned once.
A live key of the organization with the organization scopes you name, listed and revocable on its own Developers page as minted by this integration; secret is in this response only. With an Idempotency-Key, a retry within 24 hours replays the same key (stored encrypted) instead of minting another. Audited (api_key.created); refused with a 409 while the organization is not active or already holds 25 live keys.
Access: an integration key with the api-keys:write scope.
Path parameters
organizationIdstringRequired
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
expiresAtstring (date-time)When the key stops working (in the future). Omit for none.
namestringRequired1–120 characters
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:read
Response 201CreatedApiKey
Show the 16 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
LIVETESTnamestringRequiredprefixstringRequiredrevokedAtstring (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.404NOT_FOUND — no such organization among those this integration provisioned.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 POST 'https://api.trovacast.com/v1/organizations/ORGANIZATION_ID/api-keys' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"name": "Shopify app",
"scopes": [
"contacts:read"
]
}'{
"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",
"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"
}Revoke organization API key
delete
Revokes an organization API key this integration minted (immediate, idempotent).
Only a key this integration minted — one the organization’s own administrators minted answers 404. The key stops authenticating at once, together with the rest of its rotation chain (the key it replaced and any key that replaced it). Revoking a revoked key answers it again; a revocation is audited (api_key.revoked).
Access: an integration key with the api-keys:write scope.
Path parameters
organizationIdstringRequiredkeyIdstringRequired
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 200ApiKeySummary
Show the 15 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
LIVETESTnamestringRequiredprefixstringRequiredrevokedAtstring (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[]RequiredstatusstringRequiredOne 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.404NOT_FOUND — no such organization, or no key this integration minted there.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/organizations/ORGANIZATION_ID/api-keys/KEY_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"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",
"revokedAt": "2026-11-05T10:00:00.000Z",
"rotatedAt": "2026-11-05T10:00:00.000Z",
"rotatedFromKeyId": "ROTATED_FROM_KEY_ID",
"scopes": [
"SCOPES"
],
"status": "ACTIVE"
}Erase organization contact
delete
Erases a contact and everything held about them.
The same erasure as DELETE /v1/contacts/:id, for an organization the integration provisioned, whatever its status. Idempotent: an already-erased contact answers 204 again.
Access: an integration key with the organizations:data-subjects scope.
Path parameters
organizationIdstring (uuid)RequiredcontactIdstring (uuid)Required
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. This endpoint converges when run again, so a 5xx stores nothing either: a retry with the same key runs it again. 1–255 visible ASCII characters; kept for 24 hours.
Response 204
Erased (or already erased).
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING — the key lacksorganizations:data-subjects; API_KEY_KIND_MISMATCH — an ORG key.404NOT_FOUND — no such organization among those this integration provisioned (or, on a contact route, no such contact in it).409CONTACT_CALL_IN_PROGRESS — on a live call; CONTACT_EVENT_IN_PROGRESS — a message or status about the contact is being applied (nothing was erased; retry shortly). 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; retry with backoff (with the same Idempotency-Key on a write).503ERASURE_STORAGE_UNAVAILABLE — stored media could not be deleted; nothing was lost, retry.
curl -X DELETE 'https://api.trovacast.com/v1/organizations/ORGANIZATION_ID/contacts/CONTACT_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"Answers 204 with no body.
Export organization contact
get
Exports everything held about a contact, for its data subject.
The same export as GET /v1/contacts/:id/export — the phone number and email in full — for an organization the integration provisioned, whatever its status. Each export is audited against the integration’s key.
Access: an integration key with the organizations:data-subjects scope.
Path parameters
organizationIdstring (uuid)RequiredcontactIdstring (uuid)Required
Response 200ContactExport
Show the 11 fieldsHide the fields
attestationsContactExportAttestation[]Required8 fields of
attestationschannelstringRequiredOne of
whatsappemailsmscreatedAtstring (date-time)Requiredidstring (uuid)RequiredoptInAtstring (date-time) | nullRequiredoriginstringRequiredrevokedAtstring (date-time) | nullRequiredsourcestringRequiredstatusstringRequiredOne of
unknownopted_inopted_out
callsContactExportCall[]Required8 fields of
callsansweredAtstring (date-time) | nullRequireddirectionstringRequiredOne of
inboundoutbounddurationSecondsinteger | nullRequiredendedAtstring (date-time) | nullRequiredextractionContactExportCallExtraction | nullRequiredWhat the call’s AI agent extracted from the conversation with its extraction schema, unmasked; null when nothing was extracted.
4 fields of
extractiondataobject | nullRequiredThe data, matching the agent’s schema. Null unless
ready.extractedAtstring (date-time)RequiredfailureCodestring | nullRequiredOne of
PROVIDER_FAILEDDECLINEDINVALID_OUTPUTUNREADABLEstatusstringRequiredOne of
readyfailed
idstring (uuid)RequiredqueuedAtstring (date-time)RequiredstatusstringRequired
consentsContactExportConsent[]Required13 fields of
consentsattestationIdstring (uuid) | nullRequiredcapturedFromCallIdstring (uuid) | nullRequiredchannelstringRequiredOne of
whatsappemailsmscreatedAtstring (date-time)RequiredmarketingstringRequiredOne of
unknownopted_inopted_outmarketingEvidencestring | nullRequiredmarketingOptInAtstring (date-time) | nullRequiredmarketingSourcestring | nullRequiredupdatedAtstring (date-time)RequiredupdatesstringRequiredOne of
unknownopted_inopted_outupdatesEvidencestring | nullRequiredupdatesOptInAtstring (date-time) | nullRequiredupdatesSourcestring | nullRequired
contactContactExportContactRequired11 fields of
contactcreatedAtstring (date-time)RequireddisplayNamestringRequireddoNotContactbooleanRequiredexternalReferencestring | nullRequiredidstring (uuid)RequiredlivemodebooleanRequiredobjectstringRequiredOne of
contactphoneContactExportPhone | nullRequired2 fields of
phonecountryCodestring | nullRequiredlast4stringRequired
statusstringRequiredOne of
activeblockedarchivedupdatedAtstring (date-time)RequiredwhatsappContactExportWhatsAppIdentityRequired2 fields of
whatsappbsuidstring | nullRequiredusernamestring | nullRequired
conversationsContactExportConversation[]Required14 fields of
conversationschannelstringRequiredOne of
whatsappemailsmscontactIdstring (uuid)RequiredcreatedAtstring (date-time)Requiredidstring (uuid)RequiredlastInboundAtstring (date-time) | nullRequiredlastMessageAtstring (date-time) | nullRequiredlastOutboundAtstring (date-time) | nullRequiredlivemodebooleanRequiredFalse for a test thread (a test contact’s, or one on the platform’s test sender).
objectstringRequiredOne of
conversationsenderIdstring (uuid) | nullRequiredsenderRefstringRequiredserviceWindowExpiresAtstring (date-time) | nullRequiredserviceWindowOpenbooleanRequiredstatusstringRequiredOne of
openresolved
exportedAtstring (date-time)RequiredfollowUpsContactExportFollowUp[]Required6 fields of
followUpscompletedAtstring (date-time) | nullRequireddueAtstring (date-time)Requiredidstring (uuid)Requirednotesstring | nullRequiredstatusstringRequiredtitlestringRequired
messagesContactExportMessage[]Required30 fields of
messagesbuttonContactExportMessageButton | nullRequired2 fields of
buttonpayloadstringRequiredtextstring | nullRequired
channelstringRequiredOne of
whatsappemailsmscontactIdstring (uuid)RequiredcontactsContactExportSharedContact[] | nullRequired4 fields of
contactsemailsContactExportSharedContactEmail[]Required2 fields of
emailsemailstringRequiredtypestring | nullRequired
namestring | nullRequiredorganizationstring | nullRequiredphonesContactExportSharedContactPhone[]Required2 fields of
phonesphonestringRequiredtypestring | nullRequired
contextContactExportMessageContext | nullRequired2 fields of
contextmessageIdstring (uuid) | nullRequiredproviderMessageIdstringRequired
conversationIdstring (uuid)RequiredcreatedAtstring (date-time)RequireddeliveredAtstring (date-time) | nullRequireddirectionstringRequiredOne of
inboundoutboundemailContactExportMessageEmail | nullRequired6 fields of
emailattachmentsContactExportMessageEmailAttachment[]RequiredWhat the email carried (the files are not kept).
3 fields of
attachmentscontentTypestringRequiredfilenamestringRequiredsizeintegerRequiredBytes, decoded.
bccstring[]RequiredBlind copies, masked.
ccstring[]RequiredCopies, masked.
fromstring | nullRequiredsubjectstring | nullRequiredtostring | nullRequired
failedAtstring (date-time) | nullRequiredfailureContactExportMessageFailure | nullRequired2 fields of
failurecodestringRequiredreasonstringRequired
idstring (uuid)RequiredlivemodebooleanRequiredFalse when a test-mode (
tc_test_…) key created it: it went to a sandbox, never to a real provider, and was never billed.locationContactExportMessageLocation | nullRequired5 fields of
locationaddressstring | nullRequiredlatitudenumberRequiredlongitudenumberRequirednamestring | nullRequiredurlstring | nullRequired
mediaContactExportMessageMedia | nullRequired6 fields of
mediafailureCodestring | nullRequiredfileNamestring | nullRequiredkindstringRequiredmimeTypestring | nullRequiredsizeBytesinteger | nullRequiredstatusstringRequiredOne of
pendingreadyfailedrejected
metadataRecord<string, string>RequiredobjectstringRequiredOne of
messageorderContactExportMessageOrder | nullRequired3 fields of
ordercatalogIdstring | nullRequireditemsContactExportMessageOrderItem[]Required4 fields of
itemscurrencystring | nullRequireditemPricenumber | nullRequiredproductRetailerIdstringRequiredquantityintegerRequired
textstring | nullRequired
pricingContactExportMessagePricing | nullRequired4 fields of
pricingbillableboolean | nullRequiredcategorystring | nullRequiredmodelstring | nullRequiredtypestring | nullRequired
providerMessageIdstring | nullRequiredreactionContactExportMessageReaction | nullRequired1 field of
reactionemojistring | nullRequired
readAtstring (date-time) | nullRequiredsentAtstring (date-time) | nullRequiredsmsContactExportMessageSms | nullRequired8 fields of
smscountrystring | nullRequiredencodingstringRequiredOne of
gsm7ucs2expiresAtstring (date-time) | nullRequiredheaderstringRequiredThe DLT header the SMS went out from.
keywordstring | nullRequiredOne of
stopstarthelppriceContactExportMessageSmsPrice | nullRequired2 fields of
priceamountstringRequiredcurrencystringRequiredOne of
USD
segmentsintegerRequiredsendAfterstring (date-time) | nullRequired
statusstringRequiredOne of
queuedsendingsentdeliveredreadfailedreceivedtemplateContactExportMessageTemplate | nullRequired3 fields of
templateidstring (uuid)RequiredlanguagestringRequirednamestringRequired
textstring | nullRequiredtypestringRequiredupdatedAtstring (date-time)Required
objectstringRequiredOne of
contact_exportpersonalDataContactExportPersonalDataRequired16 fields of
personalDataalternatePhonestring | nullRequiredarchivedAtstring (date-time) | nullRequiredcitystring | nullRequiredcompanystring | nullRequiredcontactConsentContactExportContactConsentRequired4 fields of
contactConsentevidencestring | nullRequiredsourcestring | nullRequiredstatusstringRequiredupdatedAtstring (date-time) | nullRequired
customFieldsobject | nullRequiredemailstring | nullRequiredjobTitlestring | nullRequiredleadSourcestring | nullRequiredlifecycleStagestringRequirednotesstring | nullRequiredphonestring | nullRequiredThe full number (E.164). The one place the API returns it: it is the subject’s own data.
preferredLanguagestring | nullRequiredstatestring | nullRequiredtagsstring[]RequiredundecryptableFieldsstring[]RequiredFields reported as null because no configured key could decrypt them.
verificationsContactExportVerification[]RequiredOne-time-code verifications (
/v1/verify) sent to the contact’s phone, alternate phone or email — matched by blind index, in this organization, test mode included. Kept 30 days after the code expired; erased with the contact.11 fields of
verificationsapprovedAtstring (date-time) | nullRequiredchannelstringRequiredOne of
smswhatsappvoiceemailcreatedAtstring (date-time)RequiredendedAtstring (date-time) | nullRequiredexpiresAtstring (date-time)Requiredidstring (uuid)RequiredlivemodebooleanRequiredmetadataRecord<string, string> | nullRequiredsendCountintegerRequiredstatusstringRequiredtostring | nullRequiredThe phone number or email it was sent to, in full; null when it can no longer be decrypted.
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING — the key lacksorganizations:data-subjects; API_KEY_KIND_MISMATCH — an ORG key.404NOT_FOUND — no such organization among those this integration provisioned (or, on a contact route, no such contact in it).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/organizations/ORGANIZATION_ID/contacts/CONTACT_ID/export' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"attestations": [
{
"channel": "whatsapp",
"createdAt": "2026-11-05T10:00:00.000Z",
"id": "ID",
"optInAt": "2026-11-05T10:00:00.000Z",
"origin": "BULK",
"revokedAt": "2026-11-05T10:00:00.000Z",
"source": "SOURCE",
"status": "unknown"
}
],
"calls": [
{
"answeredAt": "2026-11-05T10:00:00.000Z",
"direction": "inbound",
"durationSeconds": 1,
"endedAt": "2026-11-05T10:00:00.000Z",
"extraction": {
"data": {
"callbackRequested": true,
"preferredDate": "2026-11-07"
},
"extractedAt": "2026-11-05T10:00:00.000Z",
"failureCode": "PROVIDER_FAILED",
"status": "ready"
},
"id": "ID",
"queuedAt": "2026-11-05T10:00:00.000Z",
"status": "completed"
}
],
"consents": [
{
"attestationId": "ATTESTATION_ID",
"capturedFromCallId": "CAPTURED_FROM_CALL_ID",
"channel": "whatsapp",
"createdAt": "2026-11-05T10:00:00.000Z",
"marketing": "unknown",
"marketingEvidence": "MARKETING_EVIDENCE",
"marketingOptInAt": "2026-11-05T10:00:00.000Z",
"marketingSource": "MARKETING_SOURCE",
"updatedAt": "2026-11-05T10:00:00.000Z",
"updates": "unknown",
"updatesEvidence": "UPDATES_EVIDENCE",
"updatesOptInAt": "2026-11-05T10:00:00.000Z",
"updatesSource": "UPDATES_SOURCE"
}
],
"contact": {
"createdAt": "2026-11-05T10:00:00.000Z",
"displayName": "DISPLAY_NAME",
"doNotContact": true,
"externalReference": "EXTERNAL_REFERENCE",
"id": "ID",
"livemode": true,
"object": "contact",
"phone": {
"countryCode": "COUNTRY_CODE",
"last4": "3210"
},
"status": "active",
"updatedAt": "2026-11-05T10:00:00.000Z",
"whatsapp": {
"bsuid": "BSUID",
"username": "USERNAME"
}
},
"conversations": [
{
"channel": "whatsapp",
"contactId": "CONTACT_ID",
"createdAt": "2026-11-05T10:00:00.000Z",
"id": "ID",
"lastInboundAt": "2026-11-05T10:00:00.000Z",
"lastMessageAt": "2026-11-05T10:00:00.000Z",
"lastOutboundAt": "2026-11-05T10:00:00.000Z",
"livemode": true,
"object": "conversation",
"senderId": "SENDER_ID",
"senderRef": "SENDER_REF",
"serviceWindowExpiresAt": "2026-11-05T10:00:00.000Z",
"serviceWindowOpen": true,
"status": "open"
}
],
"exportedAt": "2026-11-05T10:00:00.000Z",
"followUps": [
{
"completedAt": "2026-11-05T10:00:00.000Z",
"dueAt": "2026-11-05T10:00:00.000Z",
"id": "ID",
"notes": "NOTES",
"status": "open",
"title": "TITLE"
}
],
"messages": [
{
"button": {
"payload": "PAYLOAD",
"text": "TEXT"
},
"channel": "whatsapp",
"contactId": "CONTACT_ID",
"contacts": [
{
"emails": [
{
"email": "EMAIL",
"type": "TYPE"
}
],
"name": "NAME",
"organization": "ORGANIZATION",
"phones": [
{
"phone": "PHONE",
"type": "TYPE"
}
]
}
],
"context": {
"messageId": "MESSAGE_ID",
"providerMessageId": "PROVIDER_MESSAGE_ID"
},
"conversationId": "CONVERSATION_ID",
"createdAt": "2026-11-05T10:00:00.000Z",
"deliveredAt": "2026-11-05T10:00:00.000Z",
"direction": "inbound",
"email": {
"attachments": [
{
"contentType": "CONTENT_TYPE",
"filename": "FILENAME",
"size": 1
}
],
"bcc": [
"BCC"
],
"cc": [
"CC"
],
"from": "FROM",
"subject": "SUBJECT",
"to": "TO"
},
"failedAt": "2026-11-05T10:00:00.000Z",
"failure": {
"code": "CODE",
"reason": "REASON"
},
"id": "ID",
"livemode": true,
"location": {
"address": "ADDRESS",
"latitude": 1,
"longitude": 1,
"name": "NAME",
"url": "URL"
},
"media": {
"failureCode": "FAILURE_CODE",
"fileName": "FILE_NAME",
"kind": "image",
"mimeType": "MIME_TYPE",
"sizeBytes": 1,
"status": "pending"
},
"metadata": {},
"object": "message",
"order": {
"catalogId": "CATALOG_ID",
"items": [
{
"currency": "CURRENCY",
"itemPrice": 1,
"productRetailerId": "PRODUCT_RETAILER_ID",
"quantity": 1
}
],
"text": "TEXT"
},
"pricing": {
"billable": true,
"category": "CATEGORY",
"model": "MODEL",
"type": "TYPE"
},
"providerMessageId": "PROVIDER_MESSAGE_ID",
"reaction": {
"emoji": "EMOJI"
},
"readAt": "2026-11-05T10:00:00.000Z",
"sentAt": "2026-11-05T10:00:00.000Z",
"sms": {
"country": "COUNTRY",
"encoding": "gsm7",
"expiresAt": "2026-11-05T10:00:00.000Z",
"header": "HEADER",
"keyword": "stop",
"price": {
"amount": "0.002780",
"currency": "USD"
},
"segments": 1,
"sendAfter": "2026-11-05T10:00:00.000Z"
},
"status": "queued",
"template": {
"id": "ID",
"language": "LANGUAGE",
"name": "NAME"
},
"text": "TEXT",
"type": "template",
"updatedAt": "2026-11-05T10:00:00.000Z"
}
],
"object": "contact_export",
"personalData": {
"alternatePhone": "ALTERNATE_PHONE",
"archivedAt": "2026-11-05T10:00:00.000Z",
"city": "CITY",
"company": "COMPANY",
"contactConsent": {
"evidence": "EVIDENCE",
"source": "SOURCE",
"status": "opted_in",
"updatedAt": "2026-11-05T10:00:00.000Z"
},
"customFields": {},
"email": "EMAIL",
"jobTitle": "JOB_TITLE",
"leadSource": "LEAD_SOURCE",
"lifecycleStage": "new",
"notes": "NOTES",
"phone": "+919876543210",
"preferredLanguage": "PREFERRED_LANGUAGE",
"state": "STATE",
"tags": [
"TAGS"
],
"undecryptableFields": [
"UNDECRYPTABLE_FIELDS"
]
},
"verifications": [
{
"approvedAt": "2026-11-05T10:00:00.000Z",
"channel": "sms",
"createdAt": "2026-11-05T10:00:00.000Z",
"endedAt": "2026-11-05T10:00:00.000Z",
"expiresAt": "2026-11-05T10:00:00.000Z",
"id": "ID",
"livemode": true,
"metadata": {},
"sendCount": 1,
"status": "approved",
"to": "TO"
}
]
}Search organization data subjects
post
Finds the contacts that hold a data subject’s phone number.
Ids of every contact of the organization with this number, a contact deleted in the console included (erasure must reach it). A POST so the number stays out of URLs and logs.
Access: an integration key with the organizations:data-subjects scope.
Path parameters
organizationIdstring (uuid)Required
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. This endpoint converges when run again, so a 5xx stores nothing either: a retry with the same key runs it again. 1–255 visible ASCII characters; kept for 24 hours.
Request body
phonestringRequiredThe data subject’s phone number in international format. Matched through the same normalization and blind index as
GET /v1/contacts?phone=.
Response 200DataSubjectSearchResult
dataDataSubjectContact[]RequiredThe organization’s contact with this number (a number is unique within an organization, so zero or one) — a contact deleted in the console (and so kept for its history) included, because erasure must reach it too. Ids only.
2 fields of
dataidstring (uuid)RequiredobjectstringRequiredOne of
data_subject_contact
objectstringRequiredOne of
listverificationsintegerRequiredHow many of the organization’s one-time-code verifications (
/v1/verify) were sent to the number — a code can reach a number no contact holds. They are listed in the contact’s export, erased with that contact, and purged 30 days after their code expired.
Errors
400VALIDATION_FAILED — the number is not in international format.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING — the key lacksorganizations:data-subjects; API_KEY_KIND_MISMATCH — an ORG key.404NOT_FOUND — no such organization among those this integration provisioned (or, on a contact route, no such contact in it).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; retry with backoff (with the same Idempotency-Key on a write).
curl -X POST 'https://api.trovacast.com/v1/organizations/ORGANIZATION_ID/data-subjects/search' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"phone": "+919876543210"
}'{
"data": [
{
"id": "ID",
"object": "data_subject_contact"
}
],
"object": "list",
"verifications": 1
}Reactivate organization
post
Lifts this integration’s suspension; idempotent.
Lifts a suspension this integration placed: the organization’s keys work again, but sessions are not restored — everyone signs in again. An organization already active is answered unchanged. Refused with 409 ORGANIZATION_SUSPENDED_BY_PLATFORM when the platform or a partner holds the suspension, and 409 ORGANIZATION_CLOSED for a closed organization.
Access: an integration key with the organizations:write scope.
Path parameters
organizationIdstringRequired
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
reasonstringKept on the audit log.
at most 500 characters
Response 200PublicOrganization
Its fields are listed under Get organization.
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 organization among those this integration provisioned.409ORGANIZATION_SUSPENDED_BY_PLATFORM — the platform (or a partner) holds the suspension; ORGANIZATION_CLOSED. 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/organizations/ORGANIZATION_ID/reactivate' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{}'{
"billing": {
"payer": "organization",
"spend": {
"amountMinor": 182350,
"periodEnd": "2026-11-05T10:00:00.000Z",
"periodStart": "2026-11-05T10:00:00.000Z"
},
"spendCap": {
"amountMinor": 500000,
"period": "month"
}
},
"country": "IN",
"createdAt": "2026-11-05T10:00:00.000Z",
"entitlements": {
"calling": true,
"messaging": true
},
"erasure": {
"requestedAt": "2026-11-05T10:00:00.000Z",
"status": "erasing"
},
"externalReference": "acme.myshopify.com",
"id": "ID",
"livemode": true,
"name": "NAME",
"object": "organization",
"planId": "PLAN_ID",
"slug": "SLUG",
"status": "active",
"suspendedAt": "2026-11-05T10:00:00.000Z",
"suspendedBy": "integration",
"whatsapp": {
"status": "not_connected"
}
}Suspend organization
post
Suspends an organization (its keys and sign-ins stop working); idempotent.
The organization’s API keys stop authenticating and its members are signed out at once, and suspendedBy reads integration — a suspension only this integration (or the platform) lifts. An organization already suspended, by anyone, is answered unchanged. Refused with 409 ORGANIZATION_CLOSED for a closed organization.
Access: an integration key with the organizations:write scope.
Path parameters
organizationIdstringRequired
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
reasonstringRequiredWhy; kept on the audit log.
3–500 characters
Response 200PublicOrganization
Its fields are listed under Get organization.
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 organization among those this integration provisioned.409ORGANIZATION_CLOSED — a closed organization. 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/organizations/ORGANIZATION_ID/suspend' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"reason": "App uninstalled"
}'{
"billing": {
"payer": "organization",
"spend": {
"amountMinor": 182350,
"periodEnd": "2026-11-05T10:00:00.000Z",
"periodStart": "2026-11-05T10:00:00.000Z"
},
"spendCap": {
"amountMinor": 500000,
"period": "month"
}
},
"country": "IN",
"createdAt": "2026-11-05T10:00:00.000Z",
"entitlements": {
"calling": true,
"messaging": true
},
"erasure": {
"requestedAt": "2026-11-05T10:00:00.000Z",
"status": "erasing"
},
"externalReference": "acme.myshopify.com",
"id": "ID",
"livemode": true,
"name": "NAME",
"object": "organization",
"planId": "PLAN_ID",
"slug": "SLUG",
"status": "active",
"suspendedAt": "2026-11-05T10:00:00.000Z",
"suspendedBy": "integration",
"whatsapp": {
"status": "not_connected"
}
}Get organization usage
get
Lists one organization’s spend per UTC day, channel and destination (at most 90 days).
The rows its own GET /v1/usage answers — calls, messages, number and plan fees, whoever’s wallet paid them (yours, when it bills to your integration) — over [from, to), by default the last 30 UTC days, naming the organization (organizationId). Counts and money only; a test organization’s traffic is never rated, so it has none. Reconcile it against your own metering, and against your billing organization’s statements (paidFor) and GET /v1/usage?breakdown=organization.
Access: an integration key with the organizations:read scope.
Path parameters
organizationIdstringRequired
Query parameters
fromstring (date-time)Inclusive start (an ISO 8601 date — midnight UTC — or date-time). Default: the start of the UTC day 29 days before
to.tostring (date-time)Exclusive end. Default: now. At most 90 days after
from.channelstringOnly this channel’s rows.
One of
voicesmswhatsappemailnumbersplan
Response 200PublicUsage
breakdownstringP4:
organizationwhen the rows are broken down by organization.One of
organizationdataPublicUsageRow[]RequiredOne row per UTC day × channel × destination × currency with any usage, oldest day first. Days with none are absent.
10 fields of
dataamountMinorintegerRequiredSpent, in minor units of
currency. A credit back (a plan change) is negative.billedUnitsintegerRequiredMinutes billed (whole minutes, one minimum once answered), SMS segments, messages, or fees.
channelstringRequirednumbers: number setup fees and monthly rentals;plan: the plan’s monthly fee (net of the credit back a plan change gives).One of
voicesmswhatsappemailnumbersplancountintegerRequiredVoice: calls rated (answered or not). Messages: messages charged. Numbers and plan: ledger entries.
currencystringRequireddatestringRequiredThe UTC day.
destinationstring | nullRequiredVoice: the rate cell’s destination that priced the calls — an ISO country or a
+prefix of up to six digits; SMS: the destination country. Null when the every-destination cell priced it, on WhatsApp, email, numbers and the plan, and for a message erased since.includedUnitsintegerRequiredVoice minutes the plan’s included bundle covered (not charged); 0 on every other channel.
organizationIdstring (uuid)P4: whose spend the row is — only when the read is broken down by organization (
breakdown=organization).unitstringRequiredOne of
minutesegmentmessagefee
fromstring (date-time)RequiredInclusive.
objectstringRequiredOne of
usageorganizationIdstring (uuid)P4: the organization whose spend this is, on an integration’s read of one of its organizations.
subaccountIdstring (uuid) | nullRequiredThe subaccount whose spend this is (
subaccountIdwas asked); null for your own.tostring (date-time)RequiredExclusive.
Errors
400VALIDATION_FAILED —from/tois not an ISO 8601 date or date-time,tois not afterfrom, or the window spans more than 90 days.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 organization among those this integration provisioned.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/organizations/ORGANIZATION_ID/usage' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"breakdown": "organization",
"data": [
{
"amountMinor": 1,
"billedUnits": 1,
"channel": "voice",
"count": 1,
"currency": "INR",
"date": "2026-11-04",
"destination": "GB",
"includedUnits": 1,
"organizationId": "ORGANIZATION_ID",
"unit": "minute"
}
],
"from": "2026-11-05T10:00:00.000Z",
"object": "usage",
"organizationId": "ORGANIZATION_ID",
"subaccountId": "SUBACCOUNT_ID",
"to": "2026-11-05T10:00:00.000Z"
}