REST API
Tags
Tags are simple named, optionally colored labels scoped to the company, used to mark contacts and conversations for later filtering, audience segmentation, and automation triggers. A tag's name is unique within the company. Attaching/detaching a tag to a specific contact or conversation is done via the resource-specific endpoints (`POST /contacts/{contact}/tags`, `POST /conversations/{conversation}/tags`); this section is CRUD for the tag catalogue itself.
Endpoints
| Method | Path | Summary |
|---|---|---|
| GET | /v1/tagsList the company's tags (with name search). | List the company's tags (with name search). |
| POST | /v1/tagsCreate a tag. | Create a tag. |
| PATCH | /v1/tags/{tag}Update a tag's name or color. | Update a tag's name or color. |
| DELETE | /v1/tags/{tag}Delete a tag. | Delete a tag. |
Examples
Create a tag
Request
bash
curl -X POST "https://api.aisar.app/v1/tags" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "vip",
"color": "#22c55e"
}'Response
json
{
"data": {
"message": "Tag created.",
"tag": {
"id": 7,
"company_id": 1,
"name": "vip",
"color": "#22c55e",
"created_at": "2026-02-09T18:00:00Z",
"updated_at": "2026-02-09T18:00:00Z"
}
}
}List tags
Request
bash
curl -X GET "https://api.aisar.app/v1/tags?search=vip" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"Response
json
{
"data": [
{
"id": 7,
"company_id": 1,
"name": "vip",
"color": "#22c55e",
"created_at": "2026-02-09T18:00:00Z",
"updated_at": "2026-02-09T18:00:00Z"
}
]
}