> ## Documentation Index
> Fetch the complete documentation index at: https://developer.zeeg.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a CRM Record

> Create a new record in a custom Zeeg CRM object by slug, setting typed attribute values that are validated on submit, and get back a generated record UUID

Creates a new record for a custom CRM object and returns it with a generated UUID.

## Path parameter

| Parameter    | Type   | Description                                                                                                |
| ------------ | ------ | ---------------------------------------------------------------------------------------------------------- |
| `objectSlug` | string | The slug of the custom CRM object to create a record in (e.g. `products`, `deals`). The object must exist. |

## Request body

Pass a flat JSON object where each key is an attribute slug and each value is the attribute value. You only need to include attributes you want to set — omitted attributes default to `null`.

```json theme={null}
{
  "sku": "DRESS-001",
  "price": 29,
  "inventory_count": 150,
  "in_stock": true,
  "launched_at": "2025-06-01",
  "category": { "id": "opt_abc123" }
}
```

Use [`GET /v2/crm/objects/{slug}`](/api/crm/get-a-crm-object) to discover the available attribute slugs and their types before writing records.

## Attribute types

Values are validated against the type defined on the object. Passing the wrong type returns a `400` error.

| Type          | Expected value                                     | Example                                      |
| ------------- | -------------------------------------------------- | -------------------------------------------- |
| `text`        | String, max 255 characters                         | `"DRESS-001"`                                |
| `number`      | Integer                                            | `29`                                         |
| `checkbox`    | Boolean                                            | `true` or `false`                            |
| `date`        | ISO 8601 date string                               | `"2025-06-01"`                               |
| `select`      | Object with an `id` key matching a valid option ID | `{ "id": "opt_abc123" }`                     |
| `multiselect` | Array of objects, each with an `id` key            | `[{ "id": "opt_abc" }, { "id": "opt_def" }]` |
| `relation`    | Array of record UUIDs from the related object      | `["c1d2e3f4-...", "a2b3c4d5-..."]`           |
| `user`        | Array of organization member UUIDs                 | `["member-uuid-1"]`                          |

Option IDs for `select` and `multiselect` attributes are returned when you fetch the object schema via [`GET /v2/crm/objects/{slug}`](/api/crm/get-a-crm-object).

## Unique attributes

If an attribute is marked as `isUnique`, submitting a value that already exists on another record returns a `400` error. Check for uniqueness constraints in the object schema before creating records in bulk.

## Minimal record creation

You can create a record with no attributes at all — useful when you want to allocate an ID first and fill in data later:

```json theme={null}
{}
```

## When to use this endpoint

* **Single record creation** — a user fills a form and submits a new product, deal, or custom entry.
* **One-off imports** — create a small number of known records programmatically.
* **Initial seeding** — populate a new object with a handful of records before bulk operations.

<Note>
  For bulk imports where records may already exist, prefer [Assert (upsert)](/api/crm/assert-a-crm-record) instead. It creates when no match is found and updates when one is found — eliminating the need to pre-check for duplicates.
</Note>


## OpenAPI

````yaml POST /crm/{objectSlug}
openapi: 3.0.0
info:
  title: Zeeg Public API
  description: >-
    Zeeg public API documentation.


    ## Authentication

    All endpoints require a Bearer token. You can generate an API token from
    [your Zeeg dashboard](https://app.zeeg.me/account/settings/api-access).


    Each token is scoped to specific permissions (e.g. `events:read`,
    `webhooks:write`). Make sure your token has the required scopes for the
    endpoints you want to use.


    ## Recommended Headers

    We recommend including the `Accept: application/json` header in all API
    requests to ensure you receive JSON responses.
  version: 2.0.0
  x-logo:
    url: https://app.zeeg.me/img/logo-dark.2ca83593.svg
    backgroundColor: '#f7f7f9'
    altText: zeeg
  contact:
    name: Zeeg Support
    email: support@zeeg.me
    url: https://zeeg.me/en/contact
  license:
    name: Proprietary
    url: https://zeeg.me/en/legal/terms
  termsOfService: https://zeeg.me/en/legal/terms
servers:
  - url: https://api.zeeg.me/v2
    description: Production
security:
  - bearer: []
tags:
  - name: Scheduled Events
    description: Management of events scheduled via Zeeg
  - name: Scheduling Pages
    description: Scheduling pages information and management
  - name: Availability Schedule
    description: Read and change availability for users
  - name: Webhooks
    description: Webhooks management
  - name: Notes
    description: Notes for scheduled events
  - name: Workspaces & Teams
    description: Workspace users and team member management
  - name: AI Agent
    description: AI Agent integration endpoints
  - name: Payloads
    description: Webhook payload schemas
  - name: CRM - Objects
    description: >-
      Discover the schema of CRM objects (standard and custom) including all
      attribute definitions
  - name: CRM - Companies
    description: Create, read, update, and delete CRM company records
  - name: CRM - People
    description: Create, read, update, and delete CRM person records
paths:
  /crm/{objectSlug}:
    post:
      tags:
        - CRM - Records
      summary: Create a CRM record
      description: |-
        Creates a new record for a custom CRM object.

        Pass attribute values as a flat object using attribute slugs as keys.

        **Required scope:** `crm:write`
      operationId: post-crm-record
      parameters:
        - name: objectSlug
          in: path
          required: true
          schema:
            type: string
          description: Slug of the custom CRM object.
          example: products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              description: Flat object of attribute slug → value pairs.
              example:
                sku: DRESS-001
                price: 29
                inventory_count: 150
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  status:
                    type: integer
                    example: 201
                  record:
                    $ref: '#/components/schemas/CrmRecord'
        '401':
          $ref: '#/components/responses/401'
        '403':
          description: Forbidden — missing scope or CRM not enabled
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  status:
                    type: integer
        '422':
          $ref: '#/components/responses/422'
      security:
        - bearer: []
components:
  schemas:
    CrmRecord:
      type: object
      description: A record for a custom CRM object.
      required:
        - id
        - objectSlug
        - attributes
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the record.
          example: c1d2e3f4-a5b6-7890-cdef-123456789012
        objectSlug:
          type: string
          description: Slug of the CRM object this record belongs to.
          example: products
        attributes:
          type: object
          description: >-
            Key/value pairs for the custom attributes defined on the object.
            Keys are attribute slugs.
          additionalProperties: true
          example:
            sku: DRESS-001
            price: 29
            inventory_count: 150
        createdAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the record was created.
          example: '2025-06-01T10:00:00+00:00'
        updatedAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the record was last updated.
          example: '2025-06-01T12:00:00+00:00'
  responses:
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthenticated.
          examples:
            Unauthenticated:
              value:
                message: Unauthenticated.
    '422':
      description: Unprocessable Entity
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: The given data was invalid.
              errors:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
                example:
                  field_name:
                    - The field_name field is required.
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: ''

````