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

# Create contact



## OpenAPI

````yaml /api-reference/openapi-v3.json post /contacts
openapi: 3.1.0
info:
  title: Heyy API
  version: 3.0.0
servers:
  - url: https://api.heyy.io/v3
security:
  - bearerAuth: []
paths:
  /contacts:
    post:
      summary: Create contact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                firstName:
                  type: string
                lastName:
                  type: string
                phoneNumber:
                  type: string
                email:
                  type: string
                attributes:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          value:
                            anyOf:
                              - type: string
                              - type: number
                        required:
                          - id
                          - value
                      - type: object
                        properties:
                          name:
                            type: string
                          value:
                            anyOf:
                              - type: string
                              - type: number
                        required:
                          - name
                          - value
                labels:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                    required:
                      - id
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      firstName:
                        type:
                          - string
                          - 'null'
                      lastName:
                        type:
                          - string
                          - 'null'
                      fullName:
                        type:
                          - string
                          - 'null'
                      isSubscribed:
                        type: boolean
                      handles:
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                createdAt:
                                  type: string
                                  format: date-time
                                updatedAt:
                                  type: string
                                  format: date-time
                                type:
                                  type: string
                                  enum:
                                    - phone_number
                                isPrimary:
                                  type: boolean
                                value:
                                  type: string
                                extra:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties: {}
                                hasChats:
                                  type: boolean
                              required:
                                - id
                                - createdAt
                                - updatedAt
                                - type
                                - isPrimary
                                - value
                                - extra
                              additionalProperties: false
                            - type: object
                              properties:
                                id:
                                  type: string
                                createdAt:
                                  type: string
                                  format: date-time
                                updatedAt:
                                  type: string
                                  format: date-time
                                type:
                                  type: string
                                  enum:
                                    - email
                                isPrimary:
                                  type: boolean
                                value:
                                  type: string
                                extra:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties: {}
                                hasChats:
                                  type: boolean
                              required:
                                - id
                                - createdAt
                                - updatedAt
                                - type
                                - isPrimary
                                - value
                                - extra
                              additionalProperties: false
                            - type: object
                              properties:
                                id:
                                  type: string
                                createdAt:
                                  type: string
                                  format: date-time
                                updatedAt:
                                  type: string
                                  format: date-time
                                type:
                                  type: string
                                  enum:
                                    - instagram
                                isPrimary:
                                  type: boolean
                                value:
                                  type: string
                                extra:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties: {}
                                hasChats:
                                  type: boolean
                              required:
                                - id
                                - createdAt
                                - updatedAt
                                - type
                                - isPrimary
                                - value
                                - extra
                              additionalProperties: false
                            - type: object
                              properties:
                                id:
                                  type: string
                                createdAt:
                                  type: string
                                  format: date-time
                                updatedAt:
                                  type: string
                                  format: date-time
                                type:
                                  type: string
                                  enum:
                                    - messenger
                                isPrimary:
                                  type: boolean
                                value:
                                  type: string
                                extra:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties: {}
                                hasChats:
                                  type: boolean
                              required:
                                - id
                                - createdAt
                                - updatedAt
                                - type
                                - isPrimary
                                - value
                                - extra
                              additionalProperties: false
                            - type: object
                              properties:
                                id:
                                  type: string
                                createdAt:
                                  type: string
                                  format: date-time
                                updatedAt:
                                  type: string
                                  format: date-time
                                type:
                                  type: string
                                  enum:
                                    - live_chat
                                isPrimary:
                                  type: boolean
                                value:
                                  type: string
                                extra:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties: {}
                                hasChats:
                                  type: boolean
                              required:
                                - id
                                - createdAt
                                - updatedAt
                                - type
                                - isPrimary
                                - value
                                - extra
                              additionalProperties: false
                      labels:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                          required:
                            - id
                          additionalProperties: false
                      attributes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            contactId:
                              type: string
                              format: uuid
                            attribute:
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: string
                                createdAt:
                                  type: string
                                  format: date-time
                                updatedAt:
                                  type: string
                                  format: date-time
                                name:
                                  type: string
                                type:
                                  type: string
                                  enum:
                                    - text
                                    - number
                                    - single_select
                                    - multi_select
                                    - date
                                    - datetime
                                displayName:
                                  type: string
                                description:
                                  type:
                                    - string
                                    - 'null'
                                visibility:
                                  type: object
                                  properties:
                                    inbox:
                                      type: boolean
                                    contacts:
                                      type: boolean
                                    create:
                                      type: boolean
                                  required:
                                    - inbox
                                    - contacts
                                    - create
                                details:
                                  type: object
                                  properties:
                                    options:
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          color:
                                            type: string
                                          value:
                                            type: string
                                        required:
                                          - color
                                          - value
                              required:
                                - id
                                - createdAt
                                - updatedAt
                                - name
                                - type
                                - displayName
                                - description
                                - visibility
                                - details
                              additionalProperties: false
                            value:
                              anyOf:
                                - type: string
                                - type: number
                                - type: array
                                  items:
                                    type: string
                                - type: 'null'
                                - type: 'null'
                          required:
                            - attribute
                            - value
                      displayName:
                        type:
                          - string
                          - 'null'
                      phoneNumber:
                        type:
                          - string
                          - 'null'
                      email:
                        type:
                          - string
                          - 'null'
                      chats:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                          required:
                            - id
                      metadata:
                        type: object
                        additionalProperties: {}
                    required:
                      - id
                      - createdAt
                      - updatedAt
                      - firstName
                      - lastName
                      - fullName
                      - isSubscribed
                      - handles
                      - labels
                      - attributes
                      - displayName
                      - phoneNumber
                      - email
                      - chats
                      - metadata
                    additionalProperties: false
                required:
                  - success
                  - data
                additionalProperties: false
              example:
                success: true
                data:
                  id: string
                  createdAt: '2024-01-01T00:00:00.000Z'
                  updatedAt: '2024-01-01T00:00:00.000Z'
                  firstName: string
                  lastName: string
                  fullName: string
                  isSubscribed: true
                  handles: []
                  labels: []
                  attributes: []
                  displayName: string
                  phoneNumber: string
                  email: string
                  chats: []
                  metadata: {}
        '400':
          description: Bad request. The request body or parameters are invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: invalid_body_params
                  message: Invalid body params
                  invalidParams:
                    email:
                      key: invalid_string
                      message: Invalid email
        '401':
          description: Unauthorized. A valid API key is required.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: unauthorized
                  message: Unauthorized
        '402':
          description: >-
            Payment required. The current billing plan does not allow this
            request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: insufficient_billing_plan
                  message: Insufficient billing plan
        '403':
          description: >-
            Forbidden. The API key does not have permission to perform this
            action.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: forbidden
                  message: Forbidden
        '404':
          description: Not found. The requested resource does not exist.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: contact_not_found
                  message: Contact not found
        '429':
          description: >-
            Too many requests. Retry after the time indicated by the
            X-RateLimit-Reset header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: too_many_requests
                  message: >-
                    Too many requests. Limit is applied per minute per tenant.
                    Please retry after the time indicated by the
                    X-RateLimit-Reset header.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: internal_error
                  message: Oops! Something went wrong
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````