Skip to main content
POST
Add or remove customer tags

Authorizations

Authorization
string
header
required

API key created in the organization settings.

Headers

Idempotency-Key
string

Unique key for the operation. Repeating the same key with the same body returns the original response instead of running it again.

Body

application/json
action
enum<string>
required

add adds the tags; remove takes them off. The customers' other tags stay.

Available options:
add,
remove
tag_ids
string[]
required

Tag IDs (tag_...), up to 20.

Required array length: 1 - 20 elements
Pattern: ^tag_[A-Za-z0-9_-]+$
customer_ids
string[]
required

Customer IDs (cus_...), up to 500 per call.

Required array length: 1 - 500 elements
Pattern: ^cus_[A-Za-z0-9_-]+$
operation_id
string

Optional unique id for this call, such as a UUID. Reuse the same value only to retry the same call: the retry returns the first result instead of creating again. The same value with a different body is rejected with 409.

Required string length: 8 - 128

Response

Customer tags updated.

object
string
required
Allowed value: "customer_tags"
action
enum<string>
required
Available options:
add,
remove
customers
integer
required
Required range: x >= 0
tag_ids
string[]
required
Pattern: ^tag_[A-Za-z0-9_-]+$
changed
integer
required

Customer–tag links created or removed.

Required range: x >= 0