Cobalt Docs
Api referenceCategories

Create category

Create a custom category under an existing group.

POST
/categories

Authorization

bearerAuth
AuthorizationBearer <token>

Cobalt API key (prefix ck_live_). Issue from dashboard → Settings → API keys.

In: header

Request Body

application/json

Category to create

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/categories" \  -H "Content-Type: application/json" \  -d '{    "groupId": "eb54e96e-21b8-4f54-9cd4-80fccbd06f55",    "iconKey": "string",    "name": "string"  }'
{
  "excludeFromInsights": true,
  "groupId": "string",
  "hidden": true,
  "iconKey": "string",
  "id": "string",
  "name": "string",
  "systemKey": "string"
}
{
  "code": "string",
  "error": "string"
}
{
  "code": "string",
  "error": "string"
}
{
  "error": {
    "issues": [
      {
        "code": "string",
        "message": "string",
        "path": [
          "string"
        ]
      }
    ],
    "name": "string"
  },
  "success": true
}