API reference
Subaccounts
How these fit together: the Subaccounts guide.
List subaccounts
get
Lists your subaccounts, newest first, with status, verification, balance and this period’s usage.
Filter by status (active, suspended or closed). Each item carries the subaccount’s identity, status (and who holds a suspension), business verification, product lines, plan, wallet balance and this billing period’s usage — counts and money only; its contacts, messages and calls are read with its own keys.
Access: an organization key with the subaccounts:read scope.
Query parameters
limitintegerHow many items to return.
cursorstringThe
nextCursorof the previous page. Omit for the first page.statusstringOne of
activesuspendedclosed
Response 200SubaccountPage
dataSubaccount[]RequiredIts fields are listed under Get subaccount
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/subaccounts' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"data": [
{
"balance": {
"amountMinor": 120000,
"currency": "INR"
},
"business": "same",
"createdAt": "2026-11-05T10:00:00.000Z",
"entitlements": {
"calling": true,
"messaging": true
},
"id": "ID",
"name": "NAME",
"object": "subaccount",
"plan": {
"id": "ID",
"name": "NAME"
},
"status": "active",
"suspendedAt": "2026-11-05T10:00:00.000Z",
"suspendedBy": "parent",
"usage": {
"callChargesMinor": 1,
"calls": 1,
"messageChargesMinor": 1,
"messages": 1,
"minutes": 1,
"since": "2026-11-05T10:00:00.000Z"
},
"verification": {
"inherited": true,
"required": true,
"status": "not_started",
"verified": true
}
}
],
"nextCursor": "NEXT_CURSOR"
}Create subaccount
post
Creates a subaccount (a project of your organization) on your plan, and invites its owner.
The subaccount is its own organization — own keys, wallet, data and audit trail — on your plan’s rate card with no fee, included minutes or trial credit of its own; fund it with POST /v1/subaccounts/{subaccountId}/transfers. business: "same" shares your business verification; separate makes it verify on its own. One level only, at most 100 per organization.
Access: an organization key with the subaccounts:write scope. Live keys only: a test key is refused with 422 TEST_MODE_UNSUPPORTED.
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
businessstringRequiredYour attestation (audited):
same— the same legal business as you, so it shares your business verification (approved and revoked with yours);separate— another business, which must pass its own verification before its live features work.One of
sameseparatecallingbooleanCalling for the subaccount. Default: yours. Never more than you have (
ENTITLEMENT_CALLING_DISABLED).messagingbooleanMessaging for the subaccount. Default: yours. Never more than you have (
ENTITLEMENT_MESSAGING_DISABLED).namestringRequired2–120 characters
ownerEmailstringRequiredSeated as the subaccount’s first administrator (invited; the invitation is emailed, never returned). May be your own address.
timezonestringIANA time zone. Default: yours.
Response 201CreatedSubaccount
Show the 14 fieldsHide the fields
balanceSubaccountBalanceRequired2 fields of
balanceamountMinorintegerRequiredcurrencystringRequired
businessstringRequiredWhat you attested when you created it.
One of
sameseparatecreatedAtstring (date-time)RequiredentitlementsSubaccountEntitlementsRequired2 fields of
entitlementscallingbooleanRequiredmessagingbooleanRequired
idstring (uuid)RequiredinvitationSubaccountInvitation | nullRequiredThe owner’s invitation — emailed to
ownerEmail, never returned.2 fields of
invitationdeliveredbooleanRequiredWhether the invitation email went out.
expiresAtstring (date-time)Required
namestringRequiredobjectstringRequiredOne of
subaccountplanSubaccountPlan | nullRequiredYour plan at creation: the same rate card, with no fee, included minutes or trial credit of its own.
2 fields of
planidstring (uuid)RequirednamestringRequired
statusstringRequiredOne of
activesuspendedclosedsuspendedAtstring (date-time) | nullRequiredsuspendedBystring | nullRequiredWho holds the suspension:
parent(you — you may lift it),platform, orwith_parent— your own organization is suspended, and its subaccounts with it; they come back when it does (a subaccount suspended on its own stays suspended).One of
parentplatformwith_parentusageSubaccountPeriodUsageRequired6 fields of
usagecallChargesMinorintegerRequiredcallsintegerRequiredCharged calls.
messageChargesMinorintegerRequiredmessagesintegerRequiredCharged messages.
minutesintegerRequiredBilled minutes.
sincestring (date-time)RequiredThe start of its current billing period.
verificationSubaccountVerificationRequired4 fields of
verificationinheritedbooleanRequiredThe verification is yours (
business: same): once a platform operator accepts the claim it is approved and revoked with yours.requiredbooleanRequiredWhether live features wait for an approved verification.
statusstringRequiredThe subaccount’s own verification record. A same-business subaccount starts
pending_review: your claim waits for a platform operator, and until it is accepted the subaccount holds test keys only (verified: false).approvedonce accepted —verifiedthen follows your own verification.One of
not_starteddraftpending_reviewneeds_infoapprovedrejectedexpiredverifiedbooleanRequired
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403VERIFICATION_REQUIRED — your own business verification is not approved yet; ENTITLEMENT_CALLING_DISABLED / ENTITLEMENT_MESSAGING_DISABLED — a product line you do not have. API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.409SUBACCOUNT_LIMIT_REACHED; SUBACCOUNT_NESTING_NOT_ALLOWED — your organization is itself a subaccount; SUBACCOUNTS_NOT_AVAILABLE — your organization is managed by a partner or an integration. IDEMPOTENCY_KEY_IN_FLIGHT — the first request with this Idempotency-Key is still running (retry afterRetry-After); or CONFLICT.422TEST_MODE_UNSUPPORTED — a test key cannot create organizations or move real money. IDEMPOTENCY_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/subaccounts' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"business": "same",
"name": "Acme — Mumbai store",
"ownerEmail": "owner@acme.example",
"timezone": "Asia/Kolkata"
}'{
"balance": {
"amountMinor": 120000,
"currency": "INR"
},
"business": "same",
"createdAt": "2026-11-05T10:00:00.000Z",
"entitlements": {
"calling": true,
"messaging": true
},
"id": "ID",
"invitation": {
"delivered": true,
"expiresAt": "2026-11-05T10:00:00.000Z"
},
"name": "NAME",
"object": "subaccount",
"plan": {
"id": "ID",
"name": "NAME"
},
"status": "active",
"suspendedAt": "2026-11-05T10:00:00.000Z",
"suspendedBy": "parent",
"usage": {
"callChargesMinor": 1,
"calls": 1,
"messageChargesMinor": 1,
"messages": 1,
"minutes": 1,
"since": "2026-11-05T10:00:00.000Z"
},
"verification": {
"inherited": true,
"required": true,
"status": "not_started",
"verified": true
}
}Get subaccount
get
Retrieves a subaccount.
Its identity, status (and who holds a suspension: suspendedBy), whether it shares your business verification (business) and whether it is verified, product lines, plan, wallet balance and this billing period’s usage — counts and money only. Its contacts, messages and calls are read with the subaccount’s own keys, never through this route.
Access: an organization key with the subaccounts:read scope.
Path parameters
subaccountIdstringRequired
Response 200Subaccount
Show the 13 fieldsHide the fields
balanceSubaccountBalanceRequired2 fields of
balanceamountMinorintegerRequiredcurrencystringRequired
businessstringRequiredWhat you attested when you created it.
One of
sameseparatecreatedAtstring (date-time)RequiredentitlementsSubaccountEntitlementsRequired2 fields of
entitlementscallingbooleanRequiredmessagingbooleanRequired
idstring (uuid)RequirednamestringRequiredobjectstringRequiredOne of
subaccountplanSubaccountPlan | nullRequiredYour plan at creation: the same rate card, with no fee, included minutes or trial credit of its own.
2 fields of
planidstring (uuid)RequirednamestringRequired
statusstringRequiredOne of
activesuspendedclosedsuspendedAtstring (date-time) | nullRequiredsuspendedBystring | nullRequiredWho holds the suspension:
parent(you — you may lift it),platform, orwith_parent— your own organization is suspended, and its subaccounts with it; they come back when it does (a subaccount suspended on its own stays suspended).One of
parentplatformwith_parentusageSubaccountPeriodUsageRequired6 fields of
usagecallChargesMinorintegerRequiredcallsintegerRequiredCharged calls.
messageChargesMinorintegerRequiredmessagesintegerRequiredCharged messages.
minutesintegerRequiredBilled minutes.
sincestring (date-time)RequiredThe start of its current billing period.
verificationSubaccountVerificationRequired4 fields of
verificationinheritedbooleanRequiredThe verification is yours (
business: same): once a platform operator accepts the claim it is approved and revoked with yours.requiredbooleanRequiredWhether live features wait for an approved verification.
statusstringRequiredThe subaccount’s own verification record. A same-business subaccount starts
pending_review: your claim waits for a platform operator, and until it is accepted the subaccount holds test keys only (verified: false).approvedonce accepted —verifiedthen follows your own verification.One of
not_starteddraftpending_reviewneeds_infoapprovedrejectedexpiredverifiedbooleanRequired
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 subaccount of your organization.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/subaccounts/SUBACCOUNT_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"balance": {
"amountMinor": 120000,
"currency": "INR"
},
"business": "same",
"createdAt": "2026-11-05T10:00:00.000Z",
"entitlements": {
"calling": true,
"messaging": true
},
"id": "ID",
"name": "NAME",
"object": "subaccount",
"plan": {
"id": "ID",
"name": "NAME"
},
"status": "active",
"suspendedAt": "2026-11-05T10:00:00.000Z",
"suspendedBy": "parent",
"usage": {
"callChargesMinor": 1,
"calls": 1,
"messageChargesMinor": 1,
"messages": 1,
"minutes": 1,
"since": "2026-11-05T10:00:00.000Z"
},
"verification": {
"inherited": true,
"required": true,
"status": "not_started",
"verified": true
}
}Update subaccount
patch
Renames, suspends or reactivates a subaccount (idempotent).
name, status or both. suspended stops the subaccount’s keys and sign-ins at once (suspendedBy: parent); active lifts a suspension you placed. A status it already has changes nothing, and each change is audited in both organizations. Refused with 409 ORGANIZATION_SUSPENDED_BY_PLATFORM when the platform holds the suspension, and 409 ORGANIZATION_CLOSED for a closed subaccount.
Access: an organization key with the subaccounts:write scope. Live keys only: a test key is refused with 422 TEST_MODE_UNSUPPORTED.
Path parameters
subaccountIdstringRequired
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
namestring2–120 characters
reasonstringWhy the status changes; kept on the audit log.
3–500 characters
statusstringsuspendedstops the subaccount’s keys and sign-ins at once;activelifts **your** suspension (a platform hold is409 ORGANIZATION_SUSPENDED_BY_PLATFORM). Idempotent.One of
activesuspended
Response 200Subaccount
Its fields are listed under Get subaccount.
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 subaccount of your organization.409ORGANIZATION_SUSPENDED_BY_PLATFORM — the platform holds the suspension; ORGANIZATION_CLOSED. IDEMPOTENCY_KEY_IN_FLIGHT — the first request with this Idempotency-Key is still running (retry afterRetry-After); or CONFLICT.422TEST_MODE_UNSUPPORTED — a test key cannot create organizations or move real money. IDEMPOTENCY_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/subaccounts/SUBACCOUNT_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"name": "Acme — Pune store"
}'{
"balance": {
"amountMinor": 120000,
"currency": "INR"
},
"business": "same",
"createdAt": "2026-11-05T10:00:00.000Z",
"entitlements": {
"calling": true,
"messaging": true
},
"id": "ID",
"name": "NAME",
"object": "subaccount",
"plan": {
"id": "ID",
"name": "NAME"
},
"status": "active",
"suspendedAt": "2026-11-05T10:00:00.000Z",
"suspendedBy": "parent",
"usage": {
"callChargesMinor": 1,
"calls": 1,
"messageChargesMinor": 1,
"messages": 1,
"minutes": 1,
"since": "2026-11-05T10:00:00.000Z"
},
"verification": {
"inherited": true,
"required": true,
"status": "not_started",
"verified": true
}
}Create subaccount API key
post
Mints a key for the subaccount (test by default); the secret is returned once.
The key belongs to the subaccount and acts only there. With an Idempotency-Key, a retry within 24 hours replays the same key (stored encrypted) instead of minting another.
Access: an organization key with the subaccounts:write scope. Live keys only: a test key is refused with 422 TEST_MODE_UNSUPPORTED.
Path parameters
subaccountIdstringRequired
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.
modestringA live key waits for the subaccount’s business verification (
LIVE_KEYS_REQUIRE_VERIFICATION). Either case is accepted:TEST/LIVE, asGET /v1/meand the answer name a key’smode, ortest/live.One of
testliveTESTLIVEdefault "test"
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.403LIVE_KEYS_REQUIRE_VERIFICATION — the subaccount’s business verification is not approved yet; use a test key until it is. API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.404NOT_FOUND — no such subaccount of your organization.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 cannot create organizations or move real money. IDEMPOTENCY_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/subaccounts/SUBACCOUNT_ID/api-keys' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"name": "Store backend",
"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 subaccount API key
delete
Revokes one of the subaccount’s keys (immediate, idempotent).
Any of the subaccount’s keys, whoever minted it: it 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 in both organizations.
Access: an organization key with the subaccounts:write scope. Live keys only: a test key is refused with 422 TEST_MODE_UNSUPPORTED.
Path parameters
subaccountIdstringRequiredkeyIdstringRequired
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 subaccount of your organization, or no such key of it.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 cannot create organizations or move real money. IDEMPOTENCY_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/subaccounts/SUBACCOUNT_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"
}Create subaccount transfer
post
Moves credit from your balance to the subaccount’s (to_subaccount), or back (to_parent).
Both wallets move in one transaction; the paying wallet never goes below zero. Send an Idempotency-Key: a retry with the same key answers the first transfer instead of moving credit again.
Access: an organization key with the subaccounts:write scope. Live keys only: a test key is refused with 422 TEST_MODE_UNSUPPORTED.
Path parameters
subaccountIdstringRequired
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
amountMinorintegerRequiredCredit to move, in minor units of the wallet currency.
1–1000000000
directionstringto_subaccountfunds the subaccount from your balance;to_parentmoves its unspent credit back. Never more than the paying wallet holds.One of
to_subaccountto_parentdefault "to_subaccount"
Response 201SubaccountTransfer
Show the 9 fieldsHide the fields
amountMinorintegerRequiredcreatedAtstring (date-time)RequiredcurrencystringRequireddirectionstringRequiredOne of
to_subaccountto_parentidstring (uuid)RequiredobjectstringRequiredOne of
subaccount_transferparentBalanceMinorintegerRequiredYour balance right after the transfer.
subaccountBalanceMinorintegerRequiredThe subaccount’s balance right after the transfer.
subaccountIdstring (uuid)Required
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.402BILLING_SUBSCRIPTION_SUSPENDED — the platform suspended the paying side’s billing.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.404NOT_FOUND — no such subaccount of your organization.409SUBACCOUNT_INSUFFICIENT_BALANCE — the paying wallet does not cover the amount (availableMinorsays what it holds); ORGANIZATION_CLOSED — a closed subaccount is not funded. IDEMPOTENCY_KEY_IN_FLIGHT — the first request with this Idempotency-Key is still running (retry afterRetry-After); or CONFLICT.422TEST_MODE_UNSUPPORTED — a test key cannot create organizations or move real money. IDEMPOTENCY_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/subaccounts/SUBACCOUNT_ID/transfers' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"amountMinor": 50000
}'{
"amountMinor": 1,
"createdAt": "2026-11-05T10:00:00.000Z",
"currency": "INR",
"direction": "to_subaccount",
"id": "ID",
"object": "subaccount_transfer",
"parentBalanceMinor": 1,
"subaccountBalanceMinor": 1,
"subaccountId": "SUBACCOUNT_ID"
}Get subaccount usage
get
A subaccount’s calls, messages and charges over a window (default: its current billing period) and its balance.
Counts and money only — never a contact, number, message or call. The window is at most 92 days.
Access: an organization key with the subaccounts:read scope.
Path parameters
subaccountIdstringRequired
Query parameters
fromstring (date-time)Start of the window (inclusive). Default: the start of the subaccount’s current billing period.
tostring (date-time)End of the window (exclusive). Default: now. At most 92 days after
from.
Response 200SubaccountUsage
Show the 9 fieldsHide the fields
amountMinorintegerRequiredCalls plus messages.
balanceSubaccountBalanceRequired2 fields of
balanceamountMinorintegerRequiredcurrencystringRequired
callsSubaccountCallUsageRequired3 fields of
callsamountMinorintegerRequiredcountintegerRequiredCharged calls.
minutesintegerRequiredBilled minutes.
currencystringRequiredfromstring (date-time)RequiredmessagesSubaccountMessageUsageRequired3 fields of
messagesamountMinorintegerRequiredbyChannelSubaccountUsageChannel[]Required4 fields of
byChannelamountMinorintegerRequiredchannelstringRequiredOne of
smswhatsappemailmessagesintegerRequiredunitsintegerRequiredSMS segments; one per message on the other channels.
countintegerRequiredCharged messages.
objectstringRequiredOne of
subaccount_usagesubaccountIdstring (uuid)Requiredtostring (date-time)Required
Errors
400VALIDATION_FAILED —from/tois not an ISO 8601 date-time,tois not afterfrom, or the window spans more than 92 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 subaccount of your organization.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/subaccounts/SUBACCOUNT_ID/usage' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"amountMinor": 1,
"balance": {
"amountMinor": 120000,
"currency": "INR"
},
"calls": {
"amountMinor": 1,
"count": 1,
"minutes": 1
},
"currency": "INR",
"from": "2026-11-05T10:00:00.000Z",
"messages": {
"amountMinor": 1,
"byChannel": [
{
"amountMinor": 1,
"channel": "sms",
"messages": 1,
"units": 1
}
],
"count": 1
},
"object": "subaccount_usage",
"subaccountId": "SUBACCOUNT_ID",
"to": "2026-11-05T10:00:00.000Z"
}