Skip to content
Docs

External API

Add tags to a customer

Add tags to a customer in Proto from your own system, and create any tags that don't exist yet.

Adds tags to a customer from your own system – for example, tag them VIP when they upgrade in your CRM. Tags the customer already has stay as they are, so it’s safe to send the same request twice. Not sure how to send a request? See Make your first request.

Request

Send a PUT request to:

https://v3-api.proto.cx/api/platform/v1/customers/YOUR_TEAMSPACE_ID/customer/YOUR_CUSTOMER_ID/add-tags

In the body, list the tags to add by name. In the address and the body, replace anything starting with YOUR_ with your own – YOUR_CUSTOMER_ID is your ID for the customer, the one you used when you created them:

{
  "tags": [
    { "tag": "VIP" },
    { "tag": "Renewal due", "create_if_not_exists": true, "color": "#f97316" }
  ]
}
FieldRequiredWhat it is
tagsYesThe tags to add – at least one

Each item in tags has:

FieldRequiredWhat it is
tagYesThe tag’s name, exactly as it appears in Proto. Capital letters count.
create_if_not_existsNotrue to create the tag if your teamspace doesn’t have it yet. Defaults to false.
colorNoA hex colour for a tag this request creates, such as #16a34a. Defaults to grey. It doesn’t change a tag that already exists.

Response

Proto replies 200 OK:

{ "success": true }

success is always true.

Errors

You getWhat it means
400A tag isn’t in your teamspace, and create_if_not_exists is false. No tags were added.
404No customer with this ID is in your teamspace.
422tags is empty, or a colour isn’t a hex value.

For errors any request can return, see If something goes wrong.

Stuck? Ask Advisor in the Proto dashboard, or contact us.

© Proto