Jump to

  • Quickstarts
  • API reference
  • Webhook events
  • Error codes
  • SDKs

API reference

Subaccounts

How these fit together: the Subaccounts guide.

List subaccounts

get/v1/subaccounts

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

  • limitinteger

    How many items to return.

  • cursorstring

    The nextCursor of the previous page. Omit for the first page.

  • statusstring

    One ofactivesuspendedclosed

Response 200SubaccountPage

  • dataSubaccount[]Required

    Its fields are listed under Get subaccount

  • nextCursorstring | nullRequired

    Pass back as cursor for the next page; null on the last.

Errors

Request
curl 'https://api.trovacast.com/v1/subaccounts' \
  -H "Authorization: Bearer $TROVACAST_API_KEY"
Response 200 (json)
{
  "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/v1/subaccounts

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-Keystring

    Makes 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

  • businessstringRequired

    Your 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 ofsameseparate

  • callingboolean

    Calling for the subaccount. Default: yours. Never more than you have (ENTITLEMENT_CALLING_DISABLED).

  • messagingboolean

    Messaging for the subaccount. Default: yours. Never more than you have (ENTITLEMENT_MESSAGING_DISABLED).

  • namestringRequired

    2–120 characters

  • ownerEmailstringRequired

    Seated as the subaccount’s first administrator (invited; the invitation is emailed, never returned). May be your own address.

  • timezonestring

    IANA time zone. Default: yours.

Response 201CreatedSubaccount

Show the 14 fields
  • balanceSubaccountBalanceRequired

    2 fields of balance
    • amountMinorintegerRequired

    • currencystringRequired

  • businessstringRequired

    What you attested when you created it.

    One ofsameseparate

  • createdAtstring (date-time)Required

  • entitlementsSubaccountEntitlementsRequired

    2 fields of entitlements
    • callingbooleanRequired

    • messagingbooleanRequired

  • idstring (uuid)Required

  • invitationSubaccountInvitation | nullRequired

    The owner’s invitation — emailed to ownerEmail, never returned.

    2 fields of invitation
    • deliveredbooleanRequired

      Whether the invitation email went out.

    • expiresAtstring (date-time)Required

  • namestringRequired

  • objectstringRequired

    One ofsubaccount

  • planSubaccountPlan | nullRequired

    Your plan at creation: the same rate card, with no fee, included minutes or trial credit of its own.

    2 fields of plan
    • idstring (uuid)Required

    • namestringRequired

  • statusstringRequired

    One ofactivesuspendedclosed

  • suspendedAtstring (date-time) | nullRequired

  • suspendedBystring | nullRequired

    Who holds the suspension: parent (you — you may lift it), platform, or with_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 ofparentplatformwith_parent

  • usageSubaccountPeriodUsageRequired

    6 fields of usage
    • callChargesMinorintegerRequired

    • callsintegerRequired

      Charged calls.

    • messageChargesMinorintegerRequired

    • messagesintegerRequired

      Charged messages.

    • minutesintegerRequired

      Billed minutes.

    • sincestring (date-time)Required

      The start of its current billing period.

  • verificationSubaccountVerificationRequired

    4 fields of verification
    • inheritedbooleanRequired

      The verification is yours (business: same): once a platform operator accepts the claim it is approved and revoked with yours.

    • requiredbooleanRequired

      Whether live features wait for an approved verification.

    • statusstringRequired

      The 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). approved once accepted — verified then follows your own verification.

      One ofnot_starteddraftpending_reviewneeds_infoapprovedrejectedexpired

    • verifiedbooleanRequired

Errors

Request
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"
}'
Response 201 (json)
{
  "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/v1/subaccounts/{subaccountId}

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 fields
  • balanceSubaccountBalanceRequired

    2 fields of balance
    • amountMinorintegerRequired

    • currencystringRequired

  • businessstringRequired

    What you attested when you created it.

    One ofsameseparate

  • createdAtstring (date-time)Required

  • entitlementsSubaccountEntitlementsRequired

    2 fields of entitlements
    • callingbooleanRequired

    • messagingbooleanRequired

  • idstring (uuid)Required

  • namestringRequired

  • objectstringRequired

    One ofsubaccount

  • planSubaccountPlan | nullRequired

    Your plan at creation: the same rate card, with no fee, included minutes or trial credit of its own.

    2 fields of plan
    • idstring (uuid)Required

    • namestringRequired

  • statusstringRequired

    One ofactivesuspendedclosed

  • suspendedAtstring (date-time) | nullRequired

  • suspendedBystring | nullRequired

    Who holds the suspension: parent (you — you may lift it), platform, or with_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 ofparentplatformwith_parent

  • usageSubaccountPeriodUsageRequired

    6 fields of usage
    • callChargesMinorintegerRequired

    • callsintegerRequired

      Charged calls.

    • messageChargesMinorintegerRequired

    • messagesintegerRequired

      Charged messages.

    • minutesintegerRequired

      Billed minutes.

    • sincestring (date-time)Required

      The start of its current billing period.

  • verificationSubaccountVerificationRequired

    4 fields of verification
    • inheritedbooleanRequired

      The verification is yours (business: same): once a platform operator accepts the claim it is approved and revoked with yours.

    • requiredbooleanRequired

      Whether live features wait for an approved verification.

    • statusstringRequired

      The 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). approved once accepted — verified then follows your own verification.

      One ofnot_starteddraftpending_reviewneeds_infoapprovedrejectedexpired

    • verifiedbooleanRequired

Errors

Request
curl 'https://api.trovacast.com/v1/subaccounts/SUBACCOUNT_ID' \
  -H "Authorization: Bearer $TROVACAST_API_KEY"
Response 200 (json)
{
  "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/v1/subaccounts/{subaccountId}

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-Keystring

    Makes 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

  • namestring

    2–120 characters

  • reasonstring

    Why the status changes; kept on the audit log.

    3–500 characters

  • statusstring

    suspended stops the subaccount’s keys and sign-ins at once; active lifts **your** suspension (a platform hold is 409 ORGANIZATION_SUSPENDED_BY_PLATFORM). Idempotent.

    One ofactivesuspended

Response 200Subaccount

Its fields are listed under Get subaccount.

Errors

Request
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"
}'
Response 200 (json)
{
  "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/v1/subaccounts/{subaccountId}/api-keys

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-Keystring

    Makes 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.

  • modestring

    A live key waits for the subaccount’s business verification (LIVE_KEYS_REQUIRE_VERIFICATION). Either case is accepted: TEST/LIVE, as GET /v1/me and the answer name a key’s mode, or test/live.

    One oftestliveTESTLIVE

    default "test"

  • namestringRequired

    1–120 characters

  • scopesstring[]Required

    One ofcontacts: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 fields
  • createdAtstring (date-time)Required

  • createdByApiKeyCreator | nullRequired

    4 fields of createdBy
    • displayNamestring

      The minting user (USER).

    • integrationIdstring

      The minting integration (INTEGRATION).

    • integrationNamestring

      The minting integration (INTEGRATION).

    • typestringRequired

      One ofUSERINTEGRATION

  • expiresAtstring (date-time) | nullRequired

  • idstringRequired

  • kindstringRequired

    One ofORGINTEGRATION

  • last4stringRequired

  • lastUsedAtstring (date-time) | nullRequired

  • modestringRequired

    TEST keys reach only the sandboxes.

    One ofLIVETEST

  • namestringRequired

  • prefixstringRequired

  • revokedAtstring (date-time) | nullRequired

  • rotatedAtstring (date-time) | nullRequired

    When the key was rotated. It keeps working until expiresAt (the overlap), then stops.

  • rotatedFromKeyIdstring (uuid) | nullRequired

    The key this one replaced, when a rotation minted it.

  • scopesstring[]Required

  • secretstringRequired

    The key itself. Returned only in this response and never stored — copy it now.

  • statusstringRequired

    One ofACTIVEEXPIREDREVOKED

Errors

Request
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"
  ]
}'
Response 201 (json)
{
  "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/v1/subaccounts/{subaccountId}/api-keys/{keyId}

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

  • subaccountIdstringRequired

  • keyIdstringRequired

Headers

  • Idempotency-Keystring

    Makes 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 fields
  • createdAtstring (date-time)Required

  • createdByApiKeyCreator | nullRequired

    4 fields of createdBy
    • displayNamestring

      The minting user (USER).

    • integrationIdstring

      The minting integration (INTEGRATION).

    • integrationNamestring

      The minting integration (INTEGRATION).

    • typestringRequired

      One ofUSERINTEGRATION

  • expiresAtstring (date-time) | nullRequired

  • idstringRequired

  • kindstringRequired

    One ofORGINTEGRATION

  • last4stringRequired

  • lastUsedAtstring (date-time) | nullRequired

  • modestringRequired

    TEST keys reach only the sandboxes.

    One ofLIVETEST

  • namestringRequired

  • prefixstringRequired

  • revokedAtstring (date-time) | nullRequired

  • rotatedAtstring (date-time) | nullRequired

    When the key was rotated. It keeps working until expiresAt (the overlap), then stops.

  • rotatedFromKeyIdstring (uuid) | nullRequired

    The key this one replaced, when a rotation minted it.

  • scopesstring[]Required

  • statusstringRequired

    One ofACTIVEEXPIREDREVOKED

Errors

Request
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)"
Response 200 (json)
{
  "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/v1/subaccounts/{subaccountId}/transfers

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-Keystring

    Makes 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

  • amountMinorintegerRequired

    Credit to move, in minor units of the wallet currency.

    1–1000000000

  • directionstring

    to_subaccount funds the subaccount from your balance; to_parent moves its unspent credit back. Never more than the paying wallet holds.

    One ofto_subaccountto_parent

    default "to_subaccount"

Response 201SubaccountTransfer

Show the 9 fields
  • amountMinorintegerRequired

  • createdAtstring (date-time)Required

  • currencystringRequired

  • directionstringRequired

    One ofto_subaccountto_parent

  • idstring (uuid)Required

  • objectstringRequired

    One ofsubaccount_transfer

  • parentBalanceMinorintegerRequired

    Your balance right after the transfer.

  • subaccountBalanceMinorintegerRequired

    The subaccount’s balance right after the transfer.

  • subaccountIdstring (uuid)Required

Errors

Request
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
}'
Response 201 (json)
{
  "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/v1/subaccounts/{subaccountId}/usage

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 fields
  • amountMinorintegerRequired

    Calls plus messages.

  • balanceSubaccountBalanceRequired

    2 fields of balance
    • amountMinorintegerRequired

    • currencystringRequired

  • callsSubaccountCallUsageRequired

    3 fields of calls
    • amountMinorintegerRequired

    • countintegerRequired

      Charged calls.

    • minutesintegerRequired

      Billed minutes.

  • currencystringRequired

  • fromstring (date-time)Required

  • messagesSubaccountMessageUsageRequired

    3 fields of messages
    • amountMinorintegerRequired

    • byChannelSubaccountUsageChannel[]Required

      4 fields of byChannel
      • amountMinorintegerRequired

      • channelstringRequired

        One ofsmswhatsappemail

      • messagesintegerRequired

      • unitsintegerRequired

        SMS segments; one per message on the other channels.

    • countintegerRequired

      Charged messages.

  • objectstringRequired

    One ofsubaccount_usage

  • subaccountIdstring (uuid)Required

  • tostring (date-time)Required

Errors

Request
curl 'https://api.trovacast.com/v1/subaccounts/SUBACCOUNT_ID/usage' \
  -H "Authorization: Bearer $TROVACAST_API_KEY"
Response 200 (json)
{
  "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"
}