Semaphor

Create a domain

Creates a new semantic domain in your project. The domain starts with an empty template that you can populate using the template endpoints.

Requires a project token with an Author or Admin role. Your token must have unrestricted domain access (semanticDomainAccess omitted or set to mode: "all"). Tokens scoped to specific domains cannot create new ones.

POST
/api/v1/domains

Authorization

BearerAuth
AuthorizationBearer <token>

A project-scoped access token. Generate one via the Token API with your projectId and projectSecret.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X post "https://semaphor.cloud/api/v1/domains" \  -H "Content-Type: application/json" \  -d '{    "name": "sales_metrics",    "label": "Sales Metrics",    "description": "Revenue and order tracking"  }'
{
  "domain": {
    "id": "domain_abc123",
    "projectId": "p_abc123",
    "name": "sales_metrics",
    "label": "Sales Metrics",
    "description": "Revenue and order tracking",
    "createdAt": "2026-03-22T10:00:00.000Z",
    "createdBy": "user_abc123"
  }
}
{
  "error": "string",
  "details": {},
  "errors": [
    {
      "code": "SCHEMA",
      "message": "Template schema error at datasets.0.name: Required",
      "severity": "error",
      "hint": "Update the domain template shape to match the semantic schema.",
      "context": {}
    }
  ],
  "warnings": [
    {
      "code": "SCHEMA",
      "message": "Template schema error at datasets.0.name: Required",
      "severity": "error",
      "hint": "Update the domain template shape to match the semantic schema.",
      "context": {}
    }
  ]
}
{
  "error": "string",
  "details": {},
  "errors": [
    {
      "code": "SCHEMA",
      "message": "Template schema error at datasets.0.name: Required",
      "severity": "error",
      "hint": "Update the domain template shape to match the semantic schema.",
      "context": {}
    }
  ],
  "warnings": [
    {
      "code": "SCHEMA",
      "message": "Template schema error at datasets.0.name: Required",
      "severity": "error",
      "hint": "Update the domain template shape to match the semantic schema.",
      "context": {}
    }
  ]
}
{
  "error": "string",
  "details": {},
  "errors": [
    {
      "code": "SCHEMA",
      "message": "Template schema error at datasets.0.name: Required",
      "severity": "error",
      "hint": "Update the domain template shape to match the semantic schema.",
      "context": {}
    }
  ],
  "warnings": [
    {
      "code": "SCHEMA",
      "message": "Template schema error at datasets.0.name: Required",
      "severity": "error",
      "hint": "Update the domain template shape to match the semantic schema.",
      "context": {}
    }
  ]
}