Skip to main content
WA-Campaigns
API reference

Contacts API

The org-level record of a person — one per number, shared across every audience they appear in. Read their consent, opt-out, merge fields and tags, and correct the details that are yours to correct. Consent itself is readable here and deliberately not writable: recording or clearing it is compliance-sensitive and belongs to a human.

GET/contactscontacts:read

Search contacts

Search the org's contact records — one person per number, across every audience. Returns consent, opt-out, the number verdict, marketing status, merge fields and tags.

Arguments

NameTypeInDescription
qstringqueryFree-text over number, names and email.
statusstringqueryMarketing status: SUBSCRIBED (consent, not opted out), UNSUBSCRIBED (opted out — sticky), UNDELIVERABLE (number known unreachable), UNKNOWN (no consent on record).SUBSCRIBED | UNSUBSCRIBED | UNDELIVERABLE | UNKNOWN
tagstringquery—
audienceIdstringqueryOnly people who are members of this audience.
pagenumberquery—
pageSizenumberquery—

Request

curl -X GET "https://rcs-templates-api-dot-msg2ai-server.ue.r.appspot.com/api/agent/contacts" \
  -H "Authorization: Bearer $WA_AGENT_KEY"

Same call, as a tool

# MCP tool name
list_contacts

# No CLI command for this call yet —
# use the HTTP route or the MCP tool.
GET/contacts/:idcontacts:read

Fetch one contact

Fetch one contact by its public contact id, along with the audiences they belong to.

Arguments

NameTypeInDescription
idrequiredstringpath—

Request

curl -X GET "https://rcs-templates-api-dot-msg2ai-server.ue.r.appspot.com/api/agent/contacts/<id>" \
  -H "Authorization: Bearer $WA_AGENT_KEY"

Same call, as a tool

# MCP tool name
get_contact

# No CLI command for this call yet —
# use the HTTP route or the MCP tool.
PATCH/contacts/:idcontacts:write

Correct a contact

Correct a contact's names, email, merge fields (a whole-map replace) or tags. Consent and opt-out are deliberately out of reach here: recording or clearing them is compliance-sensitive and stays with a human operator.

Arguments

NameTypeInDescription
idrequiredstringpath—
firstNamestring | nullbody—
lastNamestring | nullbody—
emailstring | nullbody—
attributesobject | nullbodyWhole-map replace of the {{merge field}} values.
tagsstring[]body—

Request

curl -X PATCH "https://rcs-templates-api-dot-msg2ai-server.ue.r.appspot.com/api/agent/contacts/<id>" \
  -H "Authorization: Bearer $WA_AGENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": <string | null>,
    "lastName": <string | null>,
    "email": <string | null>,
    "attributes": <object | null>,
    "tags": <string[]>
  }'

Same call, as a tool

# MCP tool name
update_contact

# No CLI command for this call yet —
# use the HTTP route or the MCP tool.