Add tags to company Run in API Explorer
Ask AI
You can provide an array of tags in various formats. Each element in the array can be:
- a string of the tag name (and it will find it if it exists for the firm)
- a UUID of a tag that already exists
- an array of a name value and a colour value. e.g. ['name' => 'Urgent', 'colour' => '#FF0000']
There are four different modes for dealing with tags on a model.
- create = Create the tags you provide with no model attached to them.
- attach = Add the tags you provide to the model, keeping any tags already on the model.
- sync = Only the tags you provide in the request should exist on the model, this will remove any that you have not provided.
- detach = Remove the tags you provide from the model.
Body
-
Mode for dealing with tags. Attach will add the tags to the model, sync will remove all other tags and add the ones provided, detach will remove the tags from the model, create will create the tags without attaching them to a model.
Values are
attach,sync,detach, orcreate. -
Model type to assign these tags to.
Values are
account,board,board_task,case,conversation,file,note, orplan. -
Model UUID to assign these tags to.
POST
/api/v1/tag
curl \
--request POST 'https://api.plannrcrm.com/api/v1/tag' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"mode":"attach","taggable_type":"account","taggable_uuid":"57592ca3-75e9-47f0-9d6f-84bb944b4607","tags":["Reviewed","35ceed86-ea8d-45b2-8966-2618a5ec382e",{"name":"Urgent","colour":"#FF0000"}]}'
Request examples
{
"mode": "attach",
"taggable_type": "account",
"taggable_uuid": "57592ca3-75e9-47f0-9d6f-84bb944b4607",
"tags": [
"Reviewed",
"35ceed86-ea8d-45b2-8966-2618a5ec382e",
{
"name": "Urgent",
"colour": "#FF0000"
}
]
}
Response examples (200)
{
"data": [
{
"name": "Mortgage",
"slug": "mortgage",
"uuid": "1e71f64e-2d7a-4b76-81f5-cfc5d43259eb",
"colour": "#ef4582",
"created_at": "2025-12-24T11:02:59+00:00",
"updated_at": "2025-12-24T11:02:59+00:00"
}
]
}