Tags and contact fields
10 endpoints

Tags and contact fields API

Create, rename and delete tags and custom contact fields, and add tags to contacts or take them off.

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

List tags

Read only

Every WhatsApp CRM contact tag with its tag_id and how many contacts carry it. Tags group contacts for GET /v1/contacts and POST /v1/broadcasts.

Permission: contacts:view

Takes no parameters.

bashGET /v1/tags
curl "https://backend.sheetwa.com/v1/tags" \
  -H "Authorization: Bearer $SHEETWA_API_KEY"
POST/v1/tags#

Create a tag

Writes data

Creates a WhatsApp CRM contact tag. If the name exists, returns that tag_id with already_existed: true, so it is safe to repeat.

Permission: contacts:change

Body parameters (1)

  • namerequired

    string

    The tag name, e.g. VIP.
bashPOST /v1/tags
curl -X POST "https://backend.sheetwa.com/v1/tags" \
  -H "Authorization: Bearer $SHEETWA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "VIP"
  }'
POST/v1/tags/assign#

Add tags to contacts

Writes data

Adds tags to WhatsApp CRM contacts, keeping the tags they already have. Up to 20 tags and 500 contacts per call. Safe to repeat.

Permission: contacts:change

Body parameters (2)

bashPOST /v1/tags/assign
curl -X POST "https://backend.sheetwa.com/v1/tags/assign" \
  -H "Authorization: Bearer $SHEETWA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tag_ids": [
      "TAG_ID"
    ],
    "contact_ids": [
      "CONTACT_ID"
    ]
  }'
POST/v1/tags/unassign#

Remove tags from contacts

Writes data

Removes tags from WhatsApp CRM contacts. A contact always keeps at least one tag: refuses with CANNOT_UNASSIGN_LAST_TAG and lists the contacts affected.

Permission: contacts:change

Body parameters (2)

bashPOST /v1/tags/unassign
curl -X POST "https://backend.sheetwa.com/v1/tags/unassign" \
  -H "Authorization: Bearer $SHEETWA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tag_ids": [
      "TAG_ID"
    ],
    "contact_ids": [
      "CONTACT_ID"
    ]
  }'
Writes data

Changes a WhatsApp CRM tag's name everywhere. Fails with DUPLICATE_TAG, carrying existing_tag_id, when another tag has that name.

Permission: contacts:change

Path parameters (1)

Body parameters (1)

  • namerequired

    string

    The new name.
bashPATCH /v1/tags/{tag_id}
curl -X PATCH "https://backend.sheetwa.com/v1/tags/TAG_ID" \
  -H "Authorization: Bearer $SHEETWA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "VIP"
  }'
Destructive

Deletes a WhatsApp CRM tag and removes it from every contact. Refuses with TAG_DELETE_WOULD_ORPHAN when some contacts have only this tag; give them another with POST /v1/tags/assign first. Owner or admin keys only.

Permission: contacts:change

Path parameters (1)

bashDELETE /v1/tags/{tag_id}
curl -X DELETE "https://backend.sheetwa.com/v1/tags/TAG_ID" \
  -H "Authorization: Bearer $SHEETWA_API_KEY"
GET/v1/contact-attributes#

List custom contact fields

Read only

Custom fields WhatsApp CRM contacts can carry: key, label, type. Use the key values in the attributes object of POST /v1/contacts and PATCH /v1/contacts/{contact_id}.

Permission: contacts:view

Takes no parameters.

bashGET /v1/contact-attributes
curl "https://backend.sheetwa.com/v1/contact-attributes" \
  -H "Authorization: Bearer $SHEETWA_API_KEY"
POST/v1/contact-attributes#

Create a custom contact field

Writes data

Adds a custom field to every WhatsApp CRM contact, e.g. "City" (text) or "Renewal date" (date). The key is generated from the label; read it with GET /v1/contact-attributes. Owner or admin keys only.

Permission: contacts:change

Body parameters (2)

  • labelrequired

    string

    The field name people see.
  • typerequired

    "text" | "number" | "date" | "boolean"

    boolean is a yes/no field.
bashPOST /v1/contact-attributes
curl -X POST "https://backend.sheetwa.com/v1/contact-attributes" \
  -H "Authorization: Bearer $SHEETWA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "City",
    "type": "text"
  }'
PATCH/v1/contact-attributes/{attribute_id}#

Rename a custom contact field

Writes data

Changes the label of a custom WhatsApp CRM contact field. Its key, type and saved values stay. Owner or admin keys only.

Permission: contacts:change

Path parameters (1)

Body parameters (1)

  • labelrequired

    string

    The new label.
bashPATCH /v1/contact-attributes/{attribute_id}
curl -X PATCH "https://backend.sheetwa.com/v1/contact-attributes/ATTRIBUTE_ID" \
  -H "Authorization: Bearer $SHEETWA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "City"
  }'
Destructive

Removes a custom WhatsApp CRM contact field. Saved values stay on contacts but are no longer shown. Cannot be undone. Owner or admin keys only.

Permission: contacts:change

Path parameters (1)

bashDELETE /v1/contact-attributes/{attribute_id}
curl -X DELETE "https://backend.sheetwa.com/v1/contact-attributes/ATTRIBUTE_ID" \
  -H "Authorization: Bearer $SHEETWA_API_KEY"