Create a new label
curl --request POST \
--url https://api.portkey.ai/v1/labels \
--header 'Content-Type: application/json' \
--header 'x-portkey-api-key: <api-key>' \
--data '
{
"name": "<string>",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_id": "<string>",
"description": "<string>",
"color_code": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Create Label
Creates a new label in the system
POST
/
labels
Create a new label
curl --request POST \
--url https://api.portkey.ai/v1/labels \
--header 'Content-Type: application/json' \
--header 'x-portkey-api-key: <api-key>' \
--data '
{
"name": "<string>",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_id": "<string>",
"description": "<string>",
"color_code": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Documentation Index
Fetch the complete documentation index at: https://portkey-docs-fix-cache-hit-elaborate.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Body
application/json
Name of the label
Pattern:
^(?!latest$)(?!default$)(?!\d+$)[a-zA-Z0-9_-]*[^@\s]?[a-zA-Z0-9_-]*$ID of the organisation
ID or slug of the workspace
Description of the label
Color code for the label
Response
Label created successfully
ID of the created label
Last modified on May 21, 2026
Was this page helpful?
⌘I

