API reference
Contacts
How these fit together: the Contacts guide.
List contacts
get
Lists contacts newest first (filter by exact phone or reference), or — with updatedAfter — every contact or consent change since, oldest first.
Archived contacts are not listed, and a number comes back as its last four digits only. phone (international format) and externalReference match exactly. With updatedAfter, neither filter may be sent, each item adds changedAt and its consent on every channel (null for a project without messaging), and changes from the last 3 minutes are held back: page until nextCursor is null, then resume from the last changedAt and deduplicate on id + changedAt. A test key reads live contacts with their names masked.
Access: an organization key with the contacts:read scope.
Query parameters
limitintegerHow many items to return.
cursorstringThe
nextCursorof the previous page. Omit for the first page.phonestringAn exact phone number in international format (URL-encode the
+as%2B). Matched through the same normalization and blind index the console uses; at most one contact.externalReferencestringYour own id for the contact (exact match).
updatedAfterstring (date-time)Reconciliation: every live contact whose own record OR whose consent on any channel changed at or after this instant, OLDEST change first (by
changedAt, thenid), each withchangedAtand itsconsenton every channel — so a STOP or an unsubscribe your webhook missed is found here. Changes from the last 3 minutes are held back until no earlier-stamped change can still commit. Page withnextCursoruntil it is null (a page may hold fewer thanlimititems, even none, while it is not); then resume later from the lastchangedAtyou saw and dedupe byid+changedAt. Not combinable withphoneorexternalReference.
Response 200PublicContactPage
dataPublicContact[]RequiredIts fields are listed under Get contact
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/contacts?phone=%2B919876543210' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"data": [
{
"changedAt": "2026-11-05T10:00:00.000Z",
"consent": {
"email": {
"contactId": "CONTACT_ID",
"marketing": "unknown",
"marketingSource": "MARKETING_SOURCE",
"object": "whatsapp_consent",
"updatedAt": "2026-11-05T10:00:00.000Z",
"updates": "unknown",
"updatesSource": "UPDATES_SOURCE"
},
"sms": {
"contactId": "CONTACT_ID",
"marketing": "unknown",
"marketingSource": "MARKETING_SOURCE",
"object": "whatsapp_consent",
"updatedAt": "2026-11-05T10:00:00.000Z",
"updates": "unknown",
"updatesSource": "UPDATES_SOURCE"
},
"whatsapp": {
"contactId": "CONTACT_ID",
"marketing": "unknown",
"marketingSource": "MARKETING_SOURCE",
"object": "whatsapp_consent",
"updatedAt": "2026-11-05T10:00:00.000Z",
"updates": "unknown",
"updatesSource": "UPDATES_SOURCE"
}
},
"createdAt": "2026-11-05T10:00:00.000Z",
"displayName": "Aarav Shah",
"doNotContact": true,
"externalReference": "EXTERNAL_REFERENCE",
"id": "ID",
"livemode": true,
"object": "contact",
"phone": {
"countryCode": "IN",
"last4": "3210"
},
"status": "active",
"updatedAt": "2026-11-05T10:00:00.000Z",
"whatsapp": {
"bsuid": "BSUID",
"username": "USERNAME"
}
}
],
"nextCursor": "NEXT_CURSOR"
}Upsert contact
post
Creates or updates a contact by phone number.
Matched by the number, and by externalReference when sent; the two may not point at different contacts, and a reference already set is never changed here (409 CONFLICT either way — PATCH /v1/contacts/{contactId} changes it). Answers 200 when the contact existed — only the fields sent are written, attributes merged (at most 30) — and 201 when it was created, or when an archived contact holding the number was revived with its old opt-ins reset. A test key creates test contacts but cannot change an existing contact or revive an archived one (422 TEST_MODE_UNSUPPORTED). Audited against the key.
Access: an organization key with the contacts: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
attributesobjectCustom attributes, merged into what the contact already carries (at most 30). Never returned by the API.
displayNamestringat most 120 characters
emailstringStored encrypted; never returned by the API.
externalReferencestringYour own id for this contact. It may not point at a contact with a different number (409).
at most 160 characters
phonestringRequiredInternational format. The contact’s identity: an existing contact with this number is updated, otherwise one is created.
Response 200PublicContact
A contact with this number existed and was updated.
Its fields are listed under Get contact.
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/contacts' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"phone": "+919876543210",
"displayName": "Aarav Shah",
"externalReference": "customer-1001"
}'{
"changedAt": "2026-11-05T10:00:00.000Z",
"consent": {
"email": {
"contactId": "CONTACT_ID",
"marketing": "unknown",
"marketingSource": "MARKETING_SOURCE",
"object": "whatsapp_consent",
"updatedAt": "2026-11-05T10:00:00.000Z",
"updates": "unknown",
"updatesSource": "UPDATES_SOURCE"
},
"sms": {
"contactId": "CONTACT_ID",
"marketing": "unknown",
"marketingSource": "MARKETING_SOURCE",
"object": "whatsapp_consent",
"updatedAt": "2026-11-05T10:00:00.000Z",
"updates": "unknown",
"updatesSource": "UPDATES_SOURCE"
},
"whatsapp": {
"contactId": "CONTACT_ID",
"marketing": "unknown",
"marketingSource": "MARKETING_SOURCE",
"object": "whatsapp_consent",
"updatedAt": "2026-11-05T10:00:00.000Z",
"updates": "unknown",
"updatesSource": "UPDATES_SOURCE"
}
},
"createdAt": "2026-11-05T10:00:00.000Z",
"displayName": "Aarav Shah",
"doNotContact": true,
"externalReference": "EXTERNAL_REFERENCE",
"id": "ID",
"livemode": true,
"object": "contact",
"phone": {
"countryCode": "IN",
"last4": "3210"
},
"status": "active",
"updatedAt": "2026-11-05T10:00:00.000Z",
"whatsapp": {
"bsuid": "BSUID",
"username": "USERNAME"
}
}Get contact
get
Retrieves a contact.
The number comes back as its last four digits and country code; the email address and custom attributes not at all (GET /v1/contacts/{contactId}/export answers everything held, for a data subject). An archived contact is not found. A test key reads a live contact’s name masked.
Access: an organization key with the contacts:read scope.
Path parameters
contactIdstringRequired
Response 200PublicContact
Show the 13 fieldsHide the fields
changedAtstring (date-time)Only in the
?updatedAfter=reconciliation read: the latest of the contact’s ownupdatedAtand its consents’updatedAt— its place in that read, and what to resume from.consentPublicContactConsents | nullOnly in the
?updatedAfter=reconciliation read: the contact’s consent on each channel, asGET /v1/contacts/{contactId}/consent/{channel}answers it;nullwhen the organization does not have messaging.3 fields of
consentemailPublicChannelConsentRequiredIts fields are listed under Get channel consent
smsPublicChannelConsentRequiredIts fields are listed under Get channel consent
whatsappPublicChannelConsentRequiredIts fields are listed under Get channel consent
createdAtstring (date-time)RequireddisplayNamestringRequiredThe contact’s name. A test key reads it masked (each word’s first letter,
A••• S•••), and gets no WhatsAppusername: contacts are shared by both modes, and a test key never reads a live person’s details.doNotContactbooleanRequiredThe contact opted out of all contact (or asked not to be contacted). Outranks every channel consent.
externalReferencestring | nullRequiredYour own id for this contact, unique in the organization.
idstring (uuid)RequiredlivemodebooleanRequiredfalse for a test contact — one a test key (
tc_test_…) created. A test key records consent on test contacts only; that consent never authorizes a live send, and the first live upsert or consent capture makes the contact live, clearing the opt-ins recorded in test mode.objectstringRequiredOne of
contactphonePublicContactPhone | nullRequiredNever the full number: find a contact by number with
GET /v1/contacts?phone=.2 fields of
phonecountryCodestring | nullRequiredThe ISO 3166-1 country the number belongs to.
last4stringRequiredThe last four digits only.
statusstringRequiredOne of
activeblockedarchivedupdatedAtstring (date-time)RequiredwhatsappPublicContactWhatsAppRequired2 fields of
whatsappbsuidstring | nullRequiredThe contact’s WhatsApp business-scoped user id, once known.
usernamestring | 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 contact.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/contacts/CONTACT_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"changedAt": "2026-11-05T10:00:00.000Z",
"consent": {
"email": {
"contactId": "CONTACT_ID",
"marketing": "unknown",
"marketingSource": "MARKETING_SOURCE",
"object": "whatsapp_consent",
"updatedAt": "2026-11-05T10:00:00.000Z",
"updates": "unknown",
"updatesSource": "UPDATES_SOURCE"
},
"sms": {
"contactId": "CONTACT_ID",
"marketing": "unknown",
"marketingSource": "MARKETING_SOURCE",
"object": "whatsapp_consent",
"updatedAt": "2026-11-05T10:00:00.000Z",
"updates": "unknown",
"updatesSource": "UPDATES_SOURCE"
},
"whatsapp": {
"contactId": "CONTACT_ID",
"marketing": "unknown",
"marketingSource": "MARKETING_SOURCE",
"object": "whatsapp_consent",
"updatedAt": "2026-11-05T10:00:00.000Z",
"updates": "unknown",
"updatesSource": "UPDATES_SOURCE"
}
},
"createdAt": "2026-11-05T10:00:00.000Z",
"displayName": "Aarav Shah",
"doNotContact": true,
"externalReference": "EXTERNAL_REFERENCE",
"id": "ID",
"livemode": true,
"object": "contact",
"phone": {
"countryCode": "IN",
"last4": "3210"
},
"status": "active",
"updatedAt": "2026-11-05T10:00:00.000Z",
"whatsapp": {
"bsuid": "BSUID",
"username": "USERNAME"
}
}Update contact
patch
Renames a contact or changes its externalReference.
Only displayName and externalReference (null clears it): the number and consent never change here — a new number is a new contact. Sending neither is refused; a value already held changes nothing. Refused with 409 CONFLICT when another contact holds the externalReference, or when a concurrent edit wins twice. Audited against the key.
Access: an organization key with the contacts:write scope. Live keys only: a test key is refused with 422 TEST_MODE_UNSUPPORTED.
Path parameters
contactIdstringRequired
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
displayNamestringat most 120 characters
externalReferencestring | nullYour own id for this contact;
nullclears it. Another contact holding it is a 409.at most 160 characters
Response 200PublicContact
Its fields are listed under Get contact.
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 contact.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 PATCH 'https://api.trovacast.com/v1/contacts/CONTACT_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"displayName": "Aarav Shah"
}'{
"changedAt": "2026-11-05T10:00:00.000Z",
"consent": {
"email": {
"contactId": "CONTACT_ID",
"marketing": "unknown",
"marketingSource": "MARKETING_SOURCE",
"object": "whatsapp_consent",
"updatedAt": "2026-11-05T10:00:00.000Z",
"updates": "unknown",
"updatesSource": "UPDATES_SOURCE"
},
"sms": {
"contactId": "CONTACT_ID",
"marketing": "unknown",
"marketingSource": "MARKETING_SOURCE",
"object": "whatsapp_consent",
"updatedAt": "2026-11-05T10:00:00.000Z",
"updates": "unknown",
"updatesSource": "UPDATES_SOURCE"
},
"whatsapp": {
"contactId": "CONTACT_ID",
"marketing": "unknown",
"marketingSource": "MARKETING_SOURCE",
"object": "whatsapp_consent",
"updatedAt": "2026-11-05T10:00:00.000Z",
"updates": "unknown",
"updatesSource": "UPDATES_SOURCE"
}
},
"createdAt": "2026-11-05T10:00:00.000Z",
"displayName": "Aarav Shah",
"doNotContact": true,
"externalReference": "EXTERNAL_REFERENCE",
"id": "ID",
"livemode": true,
"object": "contact",
"phone": {
"countryCode": "IN",
"last4": "3210"
},
"status": "active",
"updatedAt": "2026-11-05T10:00:00.000Z",
"whatsapp": {
"bsuid": "BSUID",
"username": "USERNAME"
}
}Erase contact
delete
Erases a contact and everything held about them.
Hard-deletes the contact, its conversations, messages, media, consents and follow-ups, purges the stored webhook payloads and cached API responses that mention it, and detaches (and strips) its call history. Idempotent: erasing an already-erased contact answers 204 again. 409 CONTACT_CALL_IN_PROGRESS while the contact is on a live call; 409 CONTACT_EVENT_IN_PROGRESS while a message or status about the contact is being applied (the contact was not erased; retry shortly); 503 ERASURE_STORAGE_UNAVAILABLE when stored media could not be deleted (retry).
Access: an organization key with the contacts:write scope. Live keys only: a test key is refused with 422 TEST_MODE_UNSUPPORTED.
Path parameters
contactIdstring (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 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/contacts/CONTACT_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"Answers 204 with no body.
Export contact
get
Exports everything held about a contact.
For a data subject access request. Unlike every other read, the phone number and email address are returned in full — they are the subject’s own data — so it needs its own scope, contacts:export (contacts:read alone is refused with 403 API_KEY_SCOPE_MISSING). Each export is audited. A TEST key exports test contacts only — the ones its own test traffic created (a simulated inbound call’s or message’s caller, a test send by number), whose number it gave — and a live contact is 422 TEST_MODE_UNSUPPORTED to it.
Access: an organization key with the contacts:export scope.
Path parameters
contactIdstring (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 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/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"
}
]
}