Skip to main content
POST
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
tags
Create Tag
curl --request POST \
  --url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/tags \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>"
}
'

Path Parameters

organizationId
string
required
Organization ID
projectId
string
required
Project ID

Request Body

name
string
required
Display name for the tag
description
string
Optional description

Example Request

{
  "name": "Artificial Intelligence",
  "description": "AI-related content"
}

Response

Returns the created Tag object. The slug is automatically generated from the name.
{
  "id": "tag789",
  "name": "Artificial Intelligence",
  "slug": "artificial-intelligence",
  "description": "AI-related content",
  "createdAt": "2024-03-22T10:00:00Z",
  "updatedAt": "2024-03-22T10:00:00Z"
}

Error Responses

Tag Name Already Exists

{
  "error": {
    "code": "TAG_NAME_EXISTS",
    "message": "A tag with this name already exists",
    "details": {
      "name": "Artificial Intelligence"
    }
  }
}

Code Examples

curl -X POST "https://api.metabind.ai/v1/organizations/org123/projects/proj456/tags" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Artificial Intelligence",
    "description": "AI-related content"
  }'