API reference
How these fit together: the Connect WhatsApp guide.
Get WhatsApp account
get
The WhatsApp connection: status, numbers, display-name review, quality, messaging limit and billing currency.
The shape whatsapp.account.updated embeds. status is not_connected until a connect session finishes (POST /v1/whatsapp/connect-sessions), needs_attention when the token is invalid or expiring, a number is restricted or quality is RED, and disconnected when the business or Meta removed access. Each number carries the senderId a send takes to go from it rather than the default number.
Access: an organization key with the whatsapp:read scope.
Response 200PublicWhatsAppAccount
Show the 10 fieldsHide the fields
billingCurrencystring | nullRequiredThe currency Meta bills the WhatsApp account in.
businessIdstring | nullRequiredconnectedAtstring (date-time) | nullRequiredconnectionMethodstring | nullRequiredOne of
embedded_signupmanualcredentialStatusstring | nullRequiredmessagingLimitstring | nullRequirednumbersPublicWhatsAppNumber[]Required10 fields of
numbersdisplayPhoneNumberstring | nullRequiredisDefaultbooleanRequiredmessagingTierstring | nullRequirednameStatusstring | nullRequiredMeta’s display-name review status (APPROVED, PENDING_REVIEW, …).
phoneNumberIdstringRequiredWhatsApp
phone_number_id.qualityRatingstring | nullRequiredsenderIdstring (uuid)RequiredOur id for the number:
senderIdonPOST /v1/messages, to send from it rather than the default number.statusstringRequiredthroughputstring | nullRequiredverifiedNamestring | nullRequired
objectstringRequiredOne of
whatsapp_accountstatusstringRequiredneeds_attention: the token is invalid or expiring, a number is restricted, or quality is RED.disconnected: access was removed by the business or Meta.One of
not_connectedconnectedneeds_attentiondisconnectedwabaIdstring | nullRequired
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/whatsapp/account' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"billingCurrency": "INR",
"businessId": "BUSINESS_ID",
"connectedAt": "2026-11-05T10:00:00.000Z",
"connectionMethod": "embedded_signup",
"credentialStatus": "CREDENTIAL_STATUS",
"messagingLimit": "MESSAGING_LIMIT",
"numbers": [
{
"displayPhoneNumber": "+91 98765 43210",
"isDefault": true,
"messagingTier": "TIER_1K",
"nameStatus": "NAME_STATUS",
"phoneNumberId": "PHONE_NUMBER_ID",
"qualityRating": "GREEN",
"senderId": "SENDER_ID",
"status": "active",
"throughput": "THROUGHPUT",
"verifiedName": "VERIFIED_NAME"
}
],
"object": "whatsapp_account",
"status": "not_connected",
"wabaId": "WABA_ID"
}Disconnect WhatsApp account
post
Disconnects the WhatsApp account (idempotent); sending stops until it is connected again.
Removes the connection and its numbers, drops Trovacast’s webhook subscription on the WhatsApp Business Account and fires whatsapp.account.updated; audited against the key. With nothing connected — never, or a disconnect that already happened — it answers the account as it stands (not_connected). Refused with 409 CONFLICT when a reconnect raced this request (read the account again).
Access: an organization key with the whatsapp:manage 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.
Response 200PublicWhatsAppAccount
Show the 10 fieldsHide the fields
billingCurrencystring | nullRequiredThe currency Meta bills the WhatsApp account in.
businessIdstring | nullRequiredconnectedAtstring (date-time) | nullRequiredconnectionMethodstring | nullRequiredOne of
embedded_signupmanualcredentialStatusstring | nullRequiredmessagingLimitstring | nullRequirednumbersPublicWhatsAppNumber[]Required10 fields of
numbersdisplayPhoneNumberstring | nullRequiredisDefaultbooleanRequiredmessagingTierstring | nullRequirednameStatusstring | nullRequiredMeta’s display-name review status (APPROVED, PENDING_REVIEW, …).
phoneNumberIdstringRequiredWhatsApp
phone_number_id.qualityRatingstring | nullRequiredsenderIdstring (uuid)RequiredOur id for the number:
senderIdonPOST /v1/messages, to send from it rather than the default number.statusstringRequiredthroughputstring | nullRequiredverifiedNamestring | nullRequired
objectstringRequiredOne of
whatsapp_accountstatusstringRequiredneeds_attention: the token is invalid or expiring, a number is restricted, or quality is RED.disconnected: access was removed by the business or Meta.One of
not_connectedconnectedneeds_attentiondisconnectedwabaIdstring | nullRequired
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.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/whatsapp/account/disconnect' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"billingCurrency": "INR",
"businessId": "BUSINESS_ID",
"connectedAt": "2026-11-05T10:00:00.000Z",
"connectionMethod": "embedded_signup",
"credentialStatus": "CREDENTIAL_STATUS",
"messagingLimit": "MESSAGING_LIMIT",
"numbers": [
{
"displayPhoneNumber": "+91 98765 43210",
"isDefault": true,
"messagingTier": "TIER_1K",
"nameStatus": "NAME_STATUS",
"phoneNumberId": "PHONE_NUMBER_ID",
"qualityRating": "GREEN",
"senderId": "SENDER_ID",
"status": "active",
"throughput": "THROUGHPUT",
"verifiedName": "VERIFIED_NAME"
}
],
"object": "whatsapp_account",
"status": "not_connected",
"wabaId": "WABA_ID"
}Create WhatsApp connect session
post
Creates a hosted WhatsApp connect link.
Returns a single-use link to Trovacast’s hosted Embedded Signup page. Open it in a new window; poll GET /v1/whatsapp/connect-sessions/{id} (or GET /v1/whatsapp/account) for the outcome. The link opens within 24 hours, and the signup must finish within 10 minutes of opening it.
Access: an organization key with the whatsapp:manage 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
returnUrlstringWhere the hosted page offers to send the person when they are done. Must be an https URL on an origin this deployment allows; omit for no button.
at most 2048 characters
Response 201WhatsAppConnectSessionCreated
expiresAtstring (date-time)RequiredThe link must be opened before this (24 h). Once opened, the signup must finish within 10 minutes.
idstring (uuid)RequiredstatusstringRequiredOne of
CREATEDOPENEDCONNECTEDREGISTEREDFAILEDEXPIREDurlstringRequiredOpen this in a new window. Shown once: the secret part is in the fragment, which the API stores only as a hash and never returns again.
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.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/whatsapp/connect-sessions' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"returnUrl": "https://admin.shopify.com/store/example/apps/trovacast"
}'{
"expiresAt": "2026-11-05T10:00:00.000Z",
"id": "ID",
"status": "CREATED",
"url": "https://trovacast.com/connect/whatsapp#t=…"
}Get WhatsApp connect session
get
Where a hosted WhatsApp connect session stands.
Poll it after opening the link: status moves CREATED → OPENED → CONNECTED → REGISTERED, or to FAILED with a failureReason, and reads EXPIRED when the link was not opened in time or the signup did not finish by activeUntil. registration says whether the number still waits for its two-step PIN. A session of another organization reads as missing; 503 WHATSAPP_CONNECT_UNAVAILABLE when sessions cannot be read right now (retry).
Access: an organization key with the whatsapp:manage scope. Live keys only: a test key is refused with 422 TEST_MODE_UNSUPPORTED.
Path parameters
sessionIdstringRequired
Response 200WhatsAppConnectSession
activeUntilstring (date-time) | nullRequiredSet once opened: the signup must finish before this.
createdAtstring (date-time)RequiredexpiresAtstring (date-time)RequiredfailureReasonstring | nullRequiredOne of
CANCELLEDMETA_ERRORCONNECT_FAILEDPIN_ATTEMPTS_EXHAUSTEDNUMBER_UNAVAILABLEKEY_INVALIDNOT_ENTITLEDidstring (uuid)Requiredregistrationstring | nullRequiredAfter the account connected: NOT_REQUIRED (already on the Cloud API), PIN_REQUIRED (waiting for the two-step PIN), REGISTERED, or NOT_REQUESTED (Meta reported no number).
One of
NOT_REQUIREDPIN_REQUIREDREGISTEREDNOT_REQUESTEDreturnUrlstring | nullRequiredstatusstringRequiredCREATED → OPENED → CONNECTED → REGISTERED, or FAILED; EXPIRED when it ran out of time first. CONNECTED is final when
registrationis NOT_REQUESTED.One of
CREATEDOPENEDCONNECTEDREGISTEREDFAILEDEXPIRED
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).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/whatsapp/connect-sessions/SESSION_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"activeUntil": "2026-11-05T10:00:00.000Z",
"createdAt": "2026-11-05T10:00:00.000Z",
"expiresAt": "2026-11-05T10:00:00.000Z",
"failureReason": "CANCELLED",
"id": "ID",
"registration": "NOT_REQUIRED",
"returnUrl": "RETURN_URL",
"status": "CREATED"
}List WhatsApp senders
get
Lists the WhatsApp numbers you can send from, with whether each can send now and Meta’s review, quality and tier.
Every number of the organization’s WhatsApp account, in one page, oldest first (nextCursor is always null): the id senderId takes on POST /v1/messages (channel whatsapp), WhatsApp’s phone_number_id, the display number and verified name, Meta’s display-name review (nameStatus), quality rating, messaging tier and throughput as Meta spells them, its status, whether it is the default, and canSend — true only while the number is active and the account is connected. Numbers join by connecting the account (POST /v1/whatsapp/connect-sessions) and Meta reviews them, so there is nothing to register here. An organization with no WhatsApp account gets an empty page. Refused with 403 ENTITLEMENT_MESSAGING_DISABLED when the organization does not have messaging.
Access: an organization key with the whatsapp:read scope.
Response 200PublicWhatsAppSenderPage
dataPublicWhatsAppSender[]RequiredIts fields are listed under Get WhatsApp sender
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/whatsapp/senders' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"data": [
{
"canSend": true,
"createdAt": "2026-11-05T10:00:00.000Z",
"displayPhoneNumber": "+91 98765 43210",
"id": "ID",
"isDefault": true,
"messagingTier": "TIER_1K",
"nameStatus": "APPROVED",
"object": "whatsapp_sender",
"phoneNumberId": "PHONE_NUMBER_ID",
"qualityRating": "GREEN",
"status": "pending_verification",
"throughput": "THROUGHPUT",
"updatedAt": "2026-11-05T10:00:00.000Z",
"verifiedName": "VERIFIED_NAME"
}
],
"nextCursor": "NEXT_CURSOR"
}Get WhatsApp sender
get
Reads one WhatsApp sender and whether it can send now.
One of the organization’s WhatsApp numbers, as GET /v1/whatsapp/senders lists it: the id senderId takes, WhatsApp’s phone_number_id, Meta’s display-name review, quality rating and tier, its status (restricted or disabled when Meta limited or banned the number), whether it is the default, and canSend (the number is active and the account connected). Refused with 404 NOT_FOUND for a number that is not yours, or when the organization has no WhatsApp account, and 403 ENTITLEMENT_MESSAGING_DISABLED when it does not have messaging.
Access: an organization key with the whatsapp:read scope.
Path parameters
senderIdstringRequired
Response 200PublicWhatsAppSender
Show the 14 fieldsHide the fields
canSendbooleanRequiredWhether a send from it can go now: the number is
activeand the WhatsApp account is connected.createdAtstring (date-time)RequireddisplayPhoneNumberstring | nullRequiredidstring (uuid)RequiredWhat
senderIdtakes onPOST /v1/messages(WhatsApp).isDefaultbooleanRequiredmessagingTierstring | nullRequirednameStatusstring | nullRequiredMeta’s review of the display name (
APPROVED,PENDING_REVIEW,DECLINED, …), as Meta spells it.objectstringRequiredOne of
whatsapp_senderphoneNumberIdstringRequiredWhatsApp’s
phone_number_id.qualityRatingstring | nullRequiredMeta’s quality rating:
GREEN,YELLOW,RED,UNKNOWN.statusstringRequiredrestrictedordisabledwhen Meta limited or banned the number (whatsapp.account.updatedsays when).One of
pending_verificationactiverestricteddisabledthroughputstring | nullRequiredupdatedAtstring (date-time)RequiredverifiedNamestring | nullRequired
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 sender.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/whatsapp/senders/SENDER_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"canSend": true,
"createdAt": "2026-11-05T10:00:00.000Z",
"displayPhoneNumber": "+91 98765 43210",
"id": "ID",
"isDefault": true,
"messagingTier": "TIER_1K",
"nameStatus": "APPROVED",
"object": "whatsapp_sender",
"phoneNumberId": "PHONE_NUMBER_ID",
"qualityRating": "GREEN",
"status": "pending_verification",
"throughput": "THROUGHPUT",
"updatedAt": "2026-11-05T10:00:00.000Z",
"verifiedName": "VERIFIED_NAME"
}