Contacts API
List, search, create, update, unsubscribe and delete contacts in your WhatsApp CRM.
/v1/contacts#List and search contacts
Contacts matching name or phone text, status, tags and chat activity, each with its contact_id, phone, tags and last-chat time. Narrow with filters instead of paging far.
Permission: contacts:view
Query parameters (8)
querystring
Free text matched against name and phone.statuses"okay" | "duplicate" | "issue" | "unsubscribed"[]
Filter by derived status.unsubscribed= on the unsubscribe list.tag_idsstring[]
Only contacts carrying ALL of these tags.chat_activity"all" | "chatted" | "never"
chatted= has a WhatsApp chat,never= no inbound message yet.Default"all"sort"created_at" | "updated_at" | "first_name" | "last_name" | "status" | "chat_activity"
No extra notes.Default"created_at"order"asc" | "desc"
No extra notes.Default"desc"cursorstring
next_cursorfrom the previous page; omit for the first page. Keep the other filters the same; the page size stays as on the first page.page_sizeinteger
Rows per page, 1-100. Default 20.Default20
curl "https://backend.sheetwa.com/v1/contacts?page_size=20" \
-H "Authorization: Bearer $SHEETWA_API_KEY"/v1/contacts#Create a contact
Adds one contact to the WhatsApp CRM. Needs at least one tag: ids from GET /v1/tags, or make one with POST /v1/tags. For several contacts use POST /v1/contacts/bulk. Fails with PHONE_DUPLICATE, carrying existing_contact_id, when the number exists.
Permission: contacts:change
Body parameters (6)
first_namerequiredstring
No extra notes.last_namestring
No extra notes.country_coderequiredstring
Country calling code digits only, e.g.91for India.phonerequiredstring
Local number or full E.164 without the plus sign.tag_idsrequiredstring[]
tag_idvalues from GET /v1/tags.attributesobject
Custom attribute values keyed by attribute key; list valid keys with GET /v1/contact-attributes.
curl -X POST "https://backend.sheetwa.com/v1/contacts" \
-H "Authorization: Bearer $SHEETWA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Asha",
"country_code": "91",
"phone": "9876543210",
"tag_ids": [
"TAG_ID"
]
}'/v1/contacts/bulk#Create up to 100 contacts
Adds up to 100 contacts to the WhatsApp CRM in one call. Each row is checked on its own; the result lists created rows and failed rows with reasons, so one duplicate does not stop the rest. Same tag rule as POST /v1/contacts.
Permission: contacts:change
Body parameters (2)
tag_idsrequiredstring[]
Tags applied to every created contact:tag_idvalues from GET /v1/tags.contactsrequiredobject[]
No extra notes.
curl -X POST "https://backend.sheetwa.com/v1/contacts/bulk" \
-H "Authorization: Bearer $SHEETWA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tag_ids": [
"TAG_ID"
],
"contacts": [
{
"first_name": "Asha",
"country_code": "91",
"phone": "9876543210"
},
{
"first_name": "Ravi",
"country_code": "91",
"phone": "9123456780"
}
]
}'/v1/contacts/lookup#Find a contact by phone number
Normalises a phone number and returns the WhatsApp CRM contact that has it, or contact_id: null. Call before POST /v1/contacts to avoid PHONE_DUPLICATE.
Permission: contacts:view
Body parameters (2)
country_coderequiredstring
Country calling code digits only, e.g.91for India.phonerequiredstring
Local number or full E.164 without the plus sign.
curl -X POST "https://backend.sheetwa.com/v1/contacts/lookup" \
-H "Authorization: Bearer $SHEETWA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"country_code": "91",
"phone": "9876543210"
}'/v1/contacts/{contact_id}#Get a contact
One WhatsApp CRM contact: name, phone, status, unsubscribe state, tags, custom attributes and chat activity. To look a contact up by phone use POST /v1/contacts/lookup.
Permission: contacts:view
Path parameters (1)
contact_idrequiredstring
curl "https://backend.sheetwa.com/v1/contacts/CONTACT_ID" \
-H "Authorization: Bearer $SHEETWA_API_KEY"/v1/contacts/{contact_id}#Update a contact
Changes name, phone, tags or custom attributes of one WhatsApp CRM contact; omitted fields stay. tag_ids replaces the whole tag set; to add or remove single tags use POST /v1/tags/assign or POST /v1/tags/unassign. To stop messages use POST /v1/contacts/{contact_id}/unsubscribe.
Permission: contacts:change
Path parameters (1)
contact_idrequiredstring
Body parameters (6)
first_namestring
No extra notes.last_namestring
No extra notes.country_codestring
Country calling code digits only, e.g.91for India.phonestring
Local number or full E.164 without the plus sign.tag_idsstring[]
Replaces the whole tag set:tag_idvalues from GET /v1/tags, at least one.attributesobject
Custom attribute values keyed by attribute key; list valid keys with GET /v1/contact-attributes.
curl -X PATCH "https://backend.sheetwa.com/v1/contacts/CONTACT_ID" \
-H "Authorization: Bearer $SHEETWA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Asha"
}'/v1/contacts/{contact_id}#Delete a contact
Removes one contact from the WhatsApp CRM and frees its plan slot. Tags are unlinked; chat history stays. Cannot be undone. To stop messaging someone use POST /v1/contacts/{contact_id}/unsubscribe instead. Owner or admin keys only.
Permission: contacts:change
Path parameters (1)
contact_idrequiredstring
curl -X DELETE "https://backend.sheetwa.com/v1/contacts/CONTACT_ID" \
-H "Authorization: Bearer $SHEETWA_API_KEY"/v1/contacts/{contact_id}/unsubscribe#Unsubscribe a contact
Stops all WhatsApp messages to one contact: broadcasts skip them and single sends refuse them. Use when a customer asks to stop. Only a person in the dashboard can subscribe them again. Safe to repeat.
Permission: contacts:change
Path parameters (1)
contact_idrequiredstring
Body parameters (1)
reasonstring
Why they asked to stop; kept in the audit trail.
curl -X POST "https://backend.sheetwa.com/v1/contacts/CONTACT_ID/unsubscribe" \
-H "Authorization: Bearer $SHEETWA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "Asked to stop messages"
}'