Skip to main content

Add Tags to Prompt

Endpoint: PUT /api/prompts/{name}/tags

Adds tags to a prompt.

Path parameters

ParameterDescriptionTypeRequired/ Optional
nameThe name of the prompt to add tags to.stringRequired.

Request Body

The request body should be an array of tag objects.

ParameterDescriptionTypeRequired/ Optional
keyThe tag key.stringRequired.
valueThe tag value.stringRequired.

Response

Returns 200 OK, indicating that tags have been added to the prompt.

Examples

Add a tag to a prompt

Request

curl -X 'PUT' \
'https://<YOUR-SERVER-URL>/api/prompts/population-prompt/tags' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '[
{
"key": "team",
"value": "engineering"
}
]'

Response

Returns 200 OK, indicating that the tag has been added to the prompt.