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

# Create an object definition

> Creates a new object definition (entity type) in the workspace



## OpenAPI

````yaml post /v1/objects
openapi: 3.0.0
info:
  description: >-
    REST API for accessing and managing your Nex data. Generate API keys from
    the Nex web UI and use them to authenticate requests.
  title: Nex Developer API
  contact: {}
  version: '1.0'
servers:
  - url: https://app.nex.ai/api/developers
security: []
paths:
  /v1/objects:
    post:
      tags:
        - Schema
      summary: Create an object definition
      description: Creates a new object definition (entity type) in the workspace
      operationId: createObjectDefinition
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/developer.CreateObjectRequest'
        description: Object definition to create
        required: true
      responses:
        '200':
          description: Created object definition
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/developer.ObjectResponse'
        '400':
          description: Bad request - Invalid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    developer.CreateObjectRequest:
      type: object
      required:
        - name
        - slug
      properties:
        name:
          type: string
          description: Display name for the object
        name_plural:
          type: string
          description: Plural display name
        slug:
          type: string
          description: URL-safe identifier
        description:
          type: string
          description: Description of the object type
        type:
          type: string
          description: Object type
          enum:
            - person
            - company
            - custom
            - deal
      example:
        name: Project
        name_plural: Projects
        slug: project
        description: Project tracker
        type: custom
    developer.ObjectResponse:
      type: object
      properties:
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/developer.AttributeDefinitionResponse'
        created_at:
          type: string
        description:
          type: string
        id:
          type: string
        name:
          type: string
        name_plural:
          type: string
        slug:
          type: string
        type:
          type: string
    httpx.APIError:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
    developer.AttributeDefinitionResponse:
      type: object
      properties:
        description:
          type: string
        id:
          type: string
        name:
          type: string
        options:
          $ref: '#/components/schemas/developer.AttributeOptionsResponse'
        slug:
          type: string
        type:
          type: string
    developer.AttributeOptionsResponse:
      type: object
      properties:
        is_multi_value:
          type: boolean
        is_required:
          type: boolean
        is_unique:
          type: boolean
        is_whole_number:
          type: boolean
        select_options:
          type: array
          items:
            $ref: '#/components/schemas/developer.SelectOptionResponse'
        use_raw_format:
          type: boolean
    developer.SelectOptionResponse:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: 'API key for authentication (format: "Bearer YOUR_API_KEY")'
      type: apiKey
      name: Authorization
      in: header

````