Contacts
8 endpoints

Contacts API

List, search, create, update, unsubscribe and delete contacts in your WhatsApp CRM.

Badges:
Read onlyWrites dataSends to WhatsAppDestructive
GET/v1/contacts#

List and search contacts

Read only

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)

  • query

    string

    Free text matched against name and phone.
  • statuses

    "okay" | "duplicate" | "issue" | "unsubscribed"[]

    Filter by derived status. unsubscribed = on the unsubscribe list.
  • tag_ids

    string[]

    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"
  • cursor

    string

    next_cursor from the previous page; omit for the first page. Keep the other filters the same; the page size stays as on the first page.
  • page_size

    integer

    Rows per page, 1-100. Default 20.Default 20
bashGET /v1/contacts
curl "https://backend.sheetwa.com/v1/contacts?page_size=20" \
  -H "Authorization: Bearer $SHEETWA_API_KEY"
POST/v1/contacts#

Create a contact

Writes data

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_namerequired

    string

    No extra notes.
  • last_name

    string

    No extra notes.
  • country_coderequired

    string

    Country calling code digits only, e.g. 91 for India.
  • phonerequired

    string

    Local number or full E.164 without the plus sign.
  • tag_idsrequired

    string[]

    tag_id values from GET /v1/tags.
  • attributes

    object

    Custom attribute values keyed by attribute key; list valid keys with GET /v1/contact-attributes.
bashPOST /v1/contacts
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"
    ]
  }'
POST/v1/contacts/bulk#

Create up to 100 contacts

Writes data

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_idsrequired

    string[]

    Tags applied to every created contact: tag_id values from GET /v1/tags.
  • contactsrequired

    object[]

    No extra notes.
bashPOST /v1/contacts/bulk
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"
      }
    ]
  }'
POST/v1/contacts/lookup#

Find a contact by phone number

Read only

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_coderequired

    string

    Country calling code digits only, e.g. 91 for India.
  • phonerequired

    string

    Local number or full E.164 without the plus sign.
bashPOST /v1/contacts/lookup
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"
  }'
Read only

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)

bashGET /v1/contacts/{contact_id}
curl "https://backend.sheetwa.com/v1/contacts/CONTACT_ID" \
  -H "Authorization: Bearer $SHEETWA_API_KEY"
Writes data

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)

Body parameters (6)

  • first_name

    string

    No extra notes.
  • last_name

    string

    No extra notes.
  • country_code

    string

    Country calling code digits only, e.g. 91 for India.
  • phone

    string

    Local number or full E.164 without the plus sign.
  • tag_ids

    string[]

    Replaces the whole tag set: tag_id values from GET /v1/tags, at least one.
  • attributes

    object

    Custom attribute values keyed by attribute key; list valid keys with GET /v1/contact-attributes.
bashPATCH /v1/contacts/{contact_id}
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"
  }'
Destructive

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)

bashDELETE /v1/contacts/{contact_id}
curl -X DELETE "https://backend.sheetwa.com/v1/contacts/CONTACT_ID" \
  -H "Authorization: Bearer $SHEETWA_API_KEY"
Writes data

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)

Body parameters (1)

  • reason

    string

    Why they asked to stop; kept in the audit trail.
bashPOST /v1/contacts/{contact_id}/unsubscribe
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"
  }'