Skip to main content
POST
Create a tag
Creates a tag without attaching it to any prompt. To apply it, update a prompt or use bulk prompt updates. Branded and Non-branded are reserved system tag names, whatever the case. In a workspace created from v1.21, Qwairy creates these two tags itself and sets one on each prompt from its text. In every workspace, a request that uses either name as name is refused. Requires an active Business, Agency Business or Enterprise plan. Use an API token with write access enabled. See Writing data for idempotency, conditional requests and error handling.
string
required
Bearer token for your team.
string
required
Unique key for this operation. Completed responses replay for 24 hours.
string
required
Workspace identifier. The workspace must belong to the token’s team.
string
required
Tag name, 1 to 120 characters after trimming.
string | null
Optional six-digit hex color, such as #7B3AEE. Defaults to null.

Response

Returns 201 with Location, ETag and a tag object containing id, name, nullable color, version, createdAt and updatedAt.

Synthetic request and response

Errors

Invalid fields, or a reserved system tag name (Branded or Non-branded, whatever the case), return 400 INVALID_REQUEST; a missing workspace returns 404 RESOURCE_NOT_FOUND; a duplicate name returns 409 CONFLICT. See Error codes for authentication, plan, idempotency and server errors. On 429, honor Retry-After; writes can return 503 SERVICE_UNAVAILABLE if the write limiter is unavailable.