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

# Create contact

> Add a contact to the workspace.

> [!NOTE]
>
> Replace `{your-subdomain}` with your workspace's subdomain. \
> Learn how to find your subdomain in [Workspace subdomain](https://apidocs.neetochat.com/getting-started/workspace-subdomain.md).


## OpenAPI

````yaml bundled/contacts.yaml POST /visitors
openapi: 3.0.3
info:
  title: NeetoChat Contacts APIs
  version: 1.0.0
servers:
  - description: NeetoChat APIs
    url: https://{your-subdomain}.neetochat.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/getting-started/workspace-subdomain).
security: []
tags:
  - name: Contacts
    description: APIs to look up and create contacts in the workspace.
paths:
  /visitors:
    post:
      tags:
        - Contacts
      summary: Create contact
      description: Add a contact to the workspace.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/accept_header'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: >-
                    Name of the contact. Defaults to `Visitor` when omitted or
                    blank.
                  example: Sam Brown
                email:
                  type: string
                  format: email
                  description: >-
                    Email of the contact. It is stored in lowercase, and an
                    address that is not well-formed rejects the whole request.
                  example: sam@example.com
                phone_number:
                  type: string
                  example: '+14155550123'
                user_identifier:
                  type: string
                  description: >-
                    Your own identifier for the contact, such as its id in your
                    database or CRM. It is stored as sent and is not used to
                    look up an existing contact.
                  example: crm-user-123
                traits:
                  type: object
                  description: >-
                    Custom attributes to store on the contact, as free-form
                    key-value pairs. The keys `name`, `email` and
                    `user_identifier` are dropped here, since those are
                    top-level fields.
                  additionalProperties: true
                  example:
                    plan: Pro
                    country: US
                field_values_attributes:
                  type: array
                  description: >-
                    Values for the contact fields configured in your workspace,
                    under **Settings > Contact fields**. Every `field_id` must
                    be a contact field of your workspace, otherwise nothing is
                    created.
                  items:
                    type: object
                    properties:
                      field_id:
                        type: string
                        format: uuid
                        description: >-
                          Id of the contact field. It is the field's UUID, not
                          the **Key** shown on the Contact fields page.
                        example: 7f1f1f36-1f0f-4a0e-9b1f-2b0f3c4d5e6f
                      data:
                        type: object
                        description: >
                          The field's value, under a `value` key.


                          The accepted type follows the field's kind. A text
                          field takes a string, a number field takes a number or
                          a string that reads as one, and a date and time field
                          takes an ISO 8601 string. A value the field's kind
                          does not accept, or a number outside a range
                          configured on the field, rejects the whole request.
                        properties:
                          value:
                            description: The field's value.
                            example: Enterprise
                        required:
                          - value
                        example:
                          value: Enterprise
                    required:
                      - field_id
                      - data
      responses:
        '201':
          description: Created - Contact created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/contact_response'
        '422':
          description: >-
            Unprocessable Entity - The request body is invalid, and no contact
            is created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              examples:
                invalid_email:
                  summary: Malformed email
                  value:
                    error: Email is invalid
                unknown_field:
                  summary: field_id is not a contact field of this workspace
                  value:
                    error: Field values contain invalid field IDs.
                invalid_field_value:
                  summary: Field value the field's kind does not accept
                  value:
                    error: Field values data has invalid number value
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/getting-started/authentication) for more information.
      required: true
      schema:
        type: string
        default: your-api-key
    accept_header:
      in: header
      name: Accept
      description: >-
        Specifies the expected response format. Must be set to
        `application/json` for proper API communication.
      required: true
      schema:
        type: string
        enum:
          - application/json
        default: application/json
  schemas:
    contact_response:
      type: object
      properties:
        contact:
          $ref: '#/components/schemas/contact'
    error:
      type: object
      properties:
        error:
          type: string
          example: The request could not be processed.
    contact:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 2c79a334-0bc8-44e4-9504-331f59d400ab
        name:
          type: string
          example: Sam Brown
        email:
          type: string
          nullable: true
          example: sam@example.com
        phone_number:
          type: string
          nullable: true
          example: '+14155550123'
        user_identifier:
          type: string
          nullable: true
          description: Your own identifier for the contact.
          example: customer-1042
        traits:
          type: object
          nullable: true
          description: Custom attributes stored on the contact.
          additionalProperties: true
          example:
            plan: Pro
        created_at:
          type: string
          format: date-time
          example: '2026-10-08T14:35:46.785Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-10-08T14:35:46.785Z'
        field_values:
          type: array
          description: >-
            Values the contact holds for the workspace's contact fields. Fields
            without a value are left out.
          items:
            $ref: '#/components/schemas/contact_field_value'
    contact_field_value:
      type: object
      properties:
        field_id:
          type: string
          format: uuid
          description: Id of the contact field.
          example: bac73249-2ef5-46f6-b80d-78271914c2a6
        field_name:
          type: string
          description: Name of the contact field.
          example: Plan tier
        value:
          description: >-
            Value stored for the field. Its type depends on the kind of field,
            such as a string for a text field or an array for a multi-option
            field.
          example: Enterprise

````

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