Skip to Content

Create Tag

Define a new tag in a recording project.

POSThttps://api.identitycall.ai/api/v1/public/tags

Creates a tag in the project. Idempotent: an existing name is returned unchanged.

Requires write permission

This call is idempotent on name. If the project already has a tag with that name — compared case-insensitively, so VIP matches vip — the existing tag is returned with status 200 instead of 201, and nothing is created. You can call it on every sync without accumulating duplicates.

Scope

API key scopeBehavior
Account-wideCreates the tag in the project named by project_id. The parameter is required.
Project-scopedCreates the tag in the bound project. project_id may be omitted.

Request Body

Body Parameters (application/json)

NameTypeRequiredDefaultDescription
namestringYes-The tag name. Leading and trailing whitespace is stripped. Must be unique within the project, case-insensitively.
project_idintegerNo-The project to create the tag in. Required for account-wide keys; optional for project-scoped keys, which may only pass their own project id.

Colours cannot be set — they are assigned automatically from a fixed ten-colour palette, per project.

Request

curl -X POST "https://api.identitycall.ai/api/v1/public/tags" \ -H "Authorization: Bearer $IDENTITYCALL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "vip", "project_id": 12 }'

Response

Response201 Created
{
"data": {
  "id": 4,
  "name": "vip",
  "color": "#EF4444",
  "project_id": 12,
  "recordings_count": 0
}
}

A repeat call with the same name returns 200 and the existing row, recordings_count included.

Response Fields

FieldTypeDescription
idintegerUnique tag ID. Only meaningful within its project.
namestringThe tag name as stored
colorstringHex colour assigned automatically
project_idintegerThe recording project this tag belongs to
recordings_countintegerHow many recordings currently carry this tag

Errors

StatusErrorDescription
401“Invalid API key”Missing or unrecognized bearer token
403“Write permission required”API key lacks write permission
403“project_id does not match this API key’s project”A project-scoped key passed a different project’s id
404“Project not found”The project does not exist, or belongs to another account
422“name is required”name was missing, empty, or only whitespace
422“project_id is required for account-wide API keys”An account-wide key omitted project_id

See Also