Tags
Manage tags for deals, companies, and contacts. Filter resources by tags.
|
Endpoints
| GET | /api/v1/crm/tags | List tags |
| POST | /api/v1/crm/tags | Create a tag |
| PATCH | /api/v1/crm/tags/{id} | Update a tag |
| DELETE | /api/v1/crm/tags/{id} | Delete a tag |
| POST | /api/v1/crm/tag-assignments | Assign a tag to a resource |
| DELETE | /api/v1/crm/tag-assignments/{tag_id} | Remove a tag from a resource |
POST
/api/v1/crm/tag-assignmentsAssign a tag to a resource
Assign a tag to a deal, company, or contact. resource_type must be one of: deal, company, contact.
Authentication required— Include session cookie or Bearer token
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
tag_id | string | Required | ID of the tag to assign |
resource_type | string | Required | Resource type (deal / company / contact) |
resource_id | string | Required | Resource ID |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
| TagAssignment | Optional | Created tag assignment |
Code Examples
curl -X POST "https://api.blueai.jp/api/v1/crm/tag-assignments" \
-H "Cookie: better-auth.session_token=<token>" \
-H "Content-Type: application/json" \
-d '{
"tag_id": "tag_f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1",
"resource_type": "deal",
"resource_id": "deal_11111111111111111111111111111111"
}'Response Example
{
"assignment": {
"id": "taga_abababababababababababababababab",
"tag_id": "tag_f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1",
"resource_type": "deal",
"resource_id": "deal_11111111111111111111111111111111",
"tag_name": "重要顧客",
"tag_color": "#EF4444",
"created_at": "2026-02-20T10:00:00Z"
}
}DELETE
/api/v1/crm/tag-assignments/{tag_id}Remove a tag from a resource
Remove a tag assignment from a resource. Specify resource_type and resource_id as query parameters.
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tag_id | string | Required | Tag ID |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
resource_type | string | Optional | Resource type (deal / company / contact) |
resource_id | string | Optional | Resource ID |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Optional | Deletion success flag |
Code Examples
curl -X DELETE "https://api.blueai.jp/api/v1/crm/tag-assignments/:tag_id" \
-H "Cookie: better-auth.session_token=<token>"Response Example
{
"success": true
}