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

# Create contact custom field

> Creates a new custom field definition for contacts. Requires `crm:write` scope.

Creates a new custom field definition for contacts.

### Options requirement

When setting `field_type` to `dropdown` or `multi_select`, you must supply an array of allowed values in the `options` property.

### Required permissions

Requires an API key with the `crm:write` scope.


## OpenAPI

````yaml POST /contacts/custom-fields
openapi: 3.1.0
info:
  title: Automate CRM API
  description: >-
    External integration API for Automate CRM. Manage leads, contacts, products,
    follow-ups, custom fields, and real-time inbox lookups.
  version: 1.0.0
servers:
  - url: https://crm-api.automatebusiness.com/api/v1/integrations-public
    description: Production Integration Server
security:
  - apiKeyAuth: []
paths:
  /contacts/custom-fields:
    post:
      summary: Create Contact Custom Field
      description: >-
        Creates a new custom field definition for contacts. Requires `crm:write`
        scope.
      operationId: createContactCustomField
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomFieldInput'
      responses:
        '201':
          description: Contact custom field created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldMutationResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - apiKeyAuth:
            - crm:write
components:
  schemas:
    CreateCustomFieldInput:
      type: object
      required:
        - field_name
        - field_key
        - field_type
      properties:
        field_name:
          type: string
          example: Partner Tier
        field_key:
          type: string
          example: partner_tier
        field_type:
          type: string
          enum:
            - text
            - number
            - date
            - dropdown
            - multi_select
          example: dropdown
        options:
          type: array
          items:
            type: string
          description: Required when field_type is dropdown or multi_select
          example:
            - Registered
            - Certified
            - Premier
        is_required:
          type: boolean
          default: false
          example: false
    CustomFieldMutationResponse:
      allOf:
        - $ref: '#/components/schemas/MutationSuccessEnvelope'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/CustomFieldDefinition'
    MutationSuccessEnvelope:
      type: object
      description: >-
        Standard envelope returned by POST, PATCH, PUT, and DELETE (mutation)
        endpoints
      properties:
        success:
          type: boolean
          example: true
        data:
          description: The created or updated entity
        error:
          type: 'null'
          example: null
      required:
        - success
        - data
        - error
    CustomFieldDefinition:
      type: object
      properties:
        id:
          type: string
          example: cf_55102a
        entity_type:
          type: string
          enum:
            - lead
            - contact
            - product
          example: lead
        field_name:
          type: string
          example: Expected Close Date
        field_key:
          type: string
          example: expected_close_date
        field_type:
          type: string
          enum:
            - text
            - number
            - date
            - dropdown
            - multi_select
          example: date
        options:
          type: array
          items:
            type: string
          description: Permitted values when field_type is dropdown or multi_select
          example:
            - Bronze
            - Silver
            - Gold
            - Platinum
        is_required:
          type: boolean
          example: false
        created_at:
          type: string
          format: date-time
          example: '2026-10-26T06:00:00.000Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-10-26T06:00:00.000Z'
    ErrorEnvelope:
      type: object
      description: Standard error envelope returned when a request fails
      properties:
        success:
          type: boolean
          example: false
        data:
          type: 'null'
          example: null
        error:
          type: object
          properties:
            message:
              type: string
              example: Validation failed
            details:
              type: array
              items:
                type: object
                properties:
                  message:
                    type: string
                    example: Required
                  field:
                    type: string
                    example: email
                  code:
                    type: string
                    example: invalid_type
          required:
            - message
      required:
        - success
        - data
        - error
  responses:
    ValidationError:
      description: Validation failed (e.g., missing required fields, invalid format)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            success: false
            data: null
            error:
              message: Validation failed
              details:
                - message: Required
                  field: email
                  code: invalid_type
    UnauthorizedError:
      description: Unauthorized (invalid or missing x-api-key)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            success: false
            data: null
            error:
              message: Invalid or missing API key.
    ForbiddenError:
      description: Forbidden (API key lacks required crm:read or crm:write scope)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            success: false
            data: null
            error:
              message: 'Forbidden: insufficient permissions for this operation.'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Workspace API key header. The key implicitly determines your workspace
        isolation. Scopes: `crm:read` for GET/HEAD/OPTIONS, `crm:write` for
        POST/PATCH/PUT/DELETE.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.