API Reference
Tags
Tags are user-defined labels you may attach to prompts to classify them, for example branded, non-branded, or review. Every new project is seeded with these three defaults, and you may filter visibility metrics on any tag when querying analytics. Tag names are unique within a project and case-insensitive.
Endpoints
-
GET
/api/v1/tagsList tagsReturns every tag belonging to the active project. The response is paginated. Every new project is seeded with
branded,non-branded, andreviewtags. -
POST
/api/v1/tagsCreate a tagCreates a new tag in the active project. Tag names are unique per project and case-insensitive.
-
GET
/api/v1/tags/{tag}Get a tagReturns a single tag. The tag must belong to the active project.
-
PUT
/api/v1/tags/{tag}Update a tagUpdates a tag. Since this endpoint uses PUT semantics, both
nameandcolormust be present on the request body. -
DELETE
/api/v1/tags/{tag}Delete a tagDeletes a tag. Every prompt-tag attachment is removed at the same time; the prompts themselves are left untouched.
-
POST
/api/v1/prompts/{prompt}/tags/{tag}Attach a tag to a promptAttaches the given tag to the prompt. The endpoint is idempotent: attaching a tag that is already attached returns
200with no change. Both the prompt and the tag must belong to the active project. -
DELETE
/api/v1/prompts/{prompt}/tags/{tag}Detach a tag from a promptRemoves the tag from the prompt. The endpoint is idempotent: detaching a tag that is not attached returns
200with no change. Both the prompt and the tag must belong to the active project.