Add tags to company 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.
Headers
-
Content-Type string
-
Accept string
Body Required
-
Mode for dealing with tags. Valid modes are: attach|sync|detach|create. 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.
-
Model type to assign these tags to. Valid types are: account, board, board_task, case, conversation, file, note, plan
-
Model UUID to assign these tags to.
POST /api/v1/tag
curl \
-X POST https://api.plannrcrm.com/api/v1/tag \
-H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"mode":"attach","taggable_type":"message","taggable_uuid":"1a2c2c38-a4b4-4177-923d-848d1cf00ef4","tags":["Reviewed",null,{"name":"Urgent","colour":"#FF0000"}]}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json
# Payload
{
"mode": "attach",
"taggable_type": "message",
"taggable_uuid": "1a2c2c38-a4b4-4177-923d-848d1cf00ef4",
"tags": [
"Reviewed",
null,
{
"name": "Urgent",
"colour": "#FF0000"
}
]
}
Response examples (200)
{
"data": [
{
"name": "Mortgage",
"slug": "mortgage",
"uuid": "6896af70-eab5-4d10-aec2-98ce39b5f9c8",
"colour": "#ef4582",
"created_at": "2024-11-20T13:24:02+00:00",
"updated_at": "2024-11-20T13:24:02+00:00"
}
]
}