Clarify API
Schemas

Create a custom object

Creates a new custom object type in the workspace and returns its generated JSON Schema. The name is normalized to a `c_`-prefixed identifier (for example "Sales Order" becomes `c_sales_order`).

POST
/workspaces/{workspace}/schemas/objects
Authorization<token>

API key authentication. Send your key in the Authorization header as: api-key <your-api-key>.

In: header

Path Parameters

workspace*string

The workspace slug — the {slug} segment of your Clarify workspace URL.

Query Parameters

silent?boolean

When true, suppresses in-app and Slack notifications for this mutation.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/workspaces/string/schemas/objects" \  -H "Content-Type: application/json" \  -d '{    "name": "Project",    "plural": "Projects",    "description": "A customer project tracked alongside deals and companies.",    "icon": "Briefcase",    "backgroundColor": "blue"  }'
{
  "data": {
    "type": "schema",
    "id": "https://getclarify.ai/schemas/entities/c_project",
    "attributes": {
      "$schema": "https://json-schema.org/draft/2020-12/clarify",
      "$id": "https://getclarify.ai/schemas/entities/c_project",
      "title": "Project",
      "type": "object",
      "xClarifyNamespace": "objects",
      "xClarifyLabel": {
        "singular": "Project",
        "plural": "Projects"
      },
      "xClarifyAIDescription": "A customer project tracked alongside deals and companies.",
      "properties": {
        "name": {
          "type": "string",
          "title": "Name",
          "xClarifyPrimary": true
        },
        "status": {
          "type": [
            "string",
            "null"
          ],
          "title": "Status",
          "enum": [
            "Planning",
            "In progress",
            "Complete"
          ]
        },
        "company_id": {
          "type": [
            "string",
            "null"
          ],
          "title": "Company",
          "xClarifyRelationship": {
            "kind": "many-to-one",
            "entity": "company",
            "field": "projects"
          }
        }
      }
    }
  }
}
Empty
Empty