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

# Create Contact

> Creates a new contact. company_id accepts an integer ID or a domain string to auto-resolve the company. Returns the created contact on success.



## OpenAPI

````yaml POST /public/v2/contacts
openapi: 3.0.3
info:
  title: RevyOps API
  version: 1.0.0
servers: []
security: []
paths:
  /public/v2/contacts:
    post:
      tags:
        - public
      description: >-
        Creates a new contact. company_id accepts an integer ID or a domain
        string to auto-resolve the company. Returns the created contact on
        success.
      operationId: Add contact (v2)
      parameters:
        - in: query
          name: structure
          schema:
            type: string
            enum:
              - FLAT
              - NESTED
            default: NESTED
          description: >-
            Format of custom fields in response. NESTED returns array of objects
            with id, field_name, field_value. FLAT returns object with field
            names as keys.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactV2'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ContactV2'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ContactV2'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactPostResponseV2'
          description: ''
        '400':
          description: Bad Request. Invalid or missing fields.
        '401':
          description: Unauthorized. Company does not belong to this client.
        '403':
          description: Forbidden. Missing authentication credentials or invalid API key.
        '404':
          description: Company with this ID does not exist.
        '409':
          description: >-
            Conflict. Contact with this email or LinkedIn URL already exists for
            this client.
        '500':
          description: Internal Server Error. An unexpected error occurred on the server.
components:
  schemas:
    ContactV2:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        updated_time:
          type: string
          format: date-time
          readOnly: true
        email:
          type: string
          nullable: true
        linkedin_url:
          type: string
          nullable: true
        first_name:
          type: string
        last_name:
          type: string
        company_id:
          type: integer
          nullable: true
        contact_custom_fields:
          type: string
          readOnly: true
        contact_custom_fields_input:
          type: array
          items:
            $ref: '#/components/schemas/ContactCustomFields'
          writeOnly: true
        origin:
          type: string
        first_campaign_email_sent:
          type: string
          format: date-time
          readOnly: true
        last_campaign_email_sent:
          type: string
          format: date-time
          readOnly: true
        last_reply_received:
          type: string
          format: date-time
          readOnly: true
        contact_status:
          type: string
        previous_status:
          type: string
          readOnly: true
          nullable: true
        status_changed_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
      required:
        - contact_custom_fields
        - first_campaign_email_sent
        - id
        - last_campaign_email_sent
        - last_reply_received
        - previous_status
        - status_changed_at
        - updated_time
    ContactPostResponseV2:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        updated_time:
          type: string
          format: date-time
          readOnly: true
        email:
          type: string
        linkedin_url:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        company_id:
          type: integer
        contact_custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/ContactCustomFields'
        origin:
          type: string
        contact_status:
          type: string
        first_campaign_email_sent:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        last_campaign_email_sent:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        last_reply_received:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        previous_status:
          type: string
          readOnly: true
          nullable: true
        status_changed_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
      required:
        - first_campaign_email_sent
        - first_name
        - id
        - last_campaign_email_sent
        - last_name
        - last_reply_received
        - origin
        - previous_status
        - status_changed_at
        - updated_time
    ContactCustomFields:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        updated_time:
          type: string
          format: date-time
          readOnly: true
        field_name:
          type: string
        field_value:
          type: string
          maxLength: 2500
      required:
        - field_name
        - field_value
        - id
        - updated_time

````