Skip to content
Ask for an invite

Tags

Tags are your own labels for contacts: make, rename, or delete them, and tag or untag contacts in bulk. This page is generated from the OpenAPI document of release main-6976024, the one the API serves, so it lists only what the API has.

How to authenticate, where errors are explained, and the other resources are in the API reference.

The account's tags

GET /v1/tags

A page of tags, oldest first, each with how many contacts have it.

Its API key needs contacts:read.

Parameters

ParameterWhat it is
cursortext, in the query. The previous page’s next_cursor.
limita whole number from 1 to 100, in the query.

Answers

What a 200 answers

FieldWhat it is
data (required)a list, each an object.
data[].id (required)text.
data[].name (required)text.
data[].contacts (required)a whole number. How many contacts have it.
data[].created_at (required)a date and time (RFC 3339).
next_cursor (required)text, or null. Null on the last page.

Make a tag, or find the one with its name

POST /v1/tags

Answers the tag with this name, ignoring case: 201 if this request made it, 200 if the account had it. So a retry is safe.

Its API key needs contacts:write.

Request body

A application/json body.

FieldWhat it is
name (required)text, up to 100 characters.

Answers

What a 200 answers

FieldWhat it is
id (required)text.
name (required)text.
contacts (required)a whole number. How many contacts have it.
created_at (required)a date and time (RFC 3339).

What a 201 answers

FieldWhat it is
id (required)text.
name (required)text.
contacts (required)a whole number. How many contacts have it.
created_at (required)a date and time (RFC 3339).

Rename a tag

PATCH /v1/tags/{tag_id}

Its contacts keep it.

Its API key needs contacts:write.

Parameters

ParameterWhat it is
tag_id (required)text, up to 64 characters, in the path. The tag’s id (tag_…).

Request body

A application/json body.

FieldWhat it is
name (required)text, up to 100 characters.

Answers

What a 200 answers

FieldWhat it is
id (required)text.
name (required)text.
contacts (required)a whole number. How many contacts have it.
created_at (required)a date and time (RFC 3339).

Delete a tag

DELETE /v1/tags/{tag_id}

Takes it off every contact that has it. It can’t be undone, so it counts toward the account's contact-irreversible limit, its own, which unsubscribing a contact shares.

Its API key needs contacts:write.

Parameters

ParameterWhat it is
tag_id (required)text, up to 64 characters, in the path. The tag’s id (tag_…).

Answers

Tag contacts

POST /v1/tags/{tag_id}/contacts

Gives the tag to each contact named; one that has it already is left as it is. All or none.

Its API key needs contacts:write.

Parameters

ParameterWhat it is
tag_id (required)text, up to 64 characters, in the path. The tag’s id (tag_…).

Request body

A application/json body.

FieldWhat it is
contact_ids (required)a list of up to 1,000, each text. The contacts (ct_…), at most 1000.

Answers

What a 200 answers

FieldWhat it is
tagged (required)a whole number. How many didn’t have it before.

Untag contacts

POST /v1/tags/{tag_id}/contacts/remove

Takes the tag off each contact named; one without it is left as it is.

Its API key needs contacts:write.

Parameters

ParameterWhat it is
tag_id (required)text, up to 64 characters, in the path. The tag’s id (tag_…).

Request body

A application/json body.

FieldWhat it is
contact_ids (required)a list of up to 1,000, each text. The contacts (ct_…), at most 1000.

Answers

What a 200 answers

FieldWhat it is
untagged (required)a whole number. How many had it.