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

# Ingest customer contacts



## OpenAPI

````yaml post /v1/accounts/contacts/ingest
openapi: 3.0.0
info:
  title: Thena Platform
  description: The Thena Platform API description
  version: 1.0.0
  contact: {}
servers:
  - url: https://platform.thena.ai
    description: Platform
  - url: http://localhost:8000
    description: Local
security:
  - ApiKey: []
tags: []
paths:
  /v1/accounts/contacts/ingest:
    post:
      tags:
        - Accounts
      summary: Ingest customer contacts
      parameters: []
      requestBody:
        required: true
        description: Data for ingesting customer contacts
        content:
          application/json:
            schema:
              type: object
              required:
                - users
                - sinkSource
              properties:
                users:
                  type: array
                  description: Array of customer contacts to ingest
                  items:
                    type: object
                    required:
                      - firstName
                      - email
                    properties:
                      firstName:
                        type: string
                        description: The first name of the contact
                        example: John
                      lastName:
                        type: string
                        description: The last name of the contact
                        example: Doe
                      email:
                        type: string
                        description: The email address of the contact
                        example: john.doe@example.com
                      phoneNumber:
                        type: string
                        description: The phone number of the contact
                        example: '+1234567890'
                      avatarUrl:
                        type: string
                        description: URL to the contact's avatar image
                        example: https://example.com/avatar.jpg
                      accountIds:
                        type: array
                        description: Array of account UIDs to associate with this contact
                        items:
                          type: string
                          example: acc_123456789
                      contactType:
                        type: string
                        description: The type of contact
                        example: customer
                      metadata:
                        type: object
                        description: Additional metadata for the contact
                        additionalProperties: true
                        example:
                          source: manual_upload
                          customField: value
                sinkSource:
                  type: string
                  description: The source application for the ingestion
                  enum:
                    - MANUAL
                    - SLACK
                    - TEAMS
                    - INTERCOM
                    - ZENDESK
                  example: MANUAL
                logo:
                  type: string
                  description: URL to logo image for created accounts
                  example: https://example.com/logo.png
            examples:
              basic:
                summary: Basic ingest example
                value:
                  users:
                    - firstName: John
                      lastName: Doe
                      email: john.doe@example.com
                  sinkSource: MANUAL
              full:
                summary: Full example with all fields
                value:
                  users:
                    - firstName: John
                      lastName: Doe
                      email: john.doe@example.com
                      phoneNumber: '+1234567890'
                      avatarUrl: https://example.com/avatar.jpg
                      accountIds:
                        - acc_123456789
                      contactType: customer
                      metadata:
                        source: manual_upload
                        customField: value
                  sinkSource: MANUAL
                  logo: https://example.com/logo.png
      responses:
        '200':
          description: Customer contacts ingested successfully
          content:
            application/json:
              example:
                statusCode: 200
                message: Users ingested successfully!
                data:
                  - uid: cc_123456789
                    firstName: John
                    lastName: Doe
                    email: john.doe@example.com
                    phoneNumber: '+1234567890'
                    avatarUrl: https://example.com/avatar.jpg
                    contactType: customer
                    createdAt: '2023-12-07T10:30:00Z'
                    updatedAt: '2023-12-07T10:30:00Z'
        '400':
          description: Bad request - validation errors or business logic violations
          content:
            application/json:
              example:
                statusCode: 400
                message: Users array is empty
                error: Bad Request
        '403':
          description: >-
            Forbidden - user not authorized to ingest contacts for this
            organization
          content:
            application/json:
              example:
                statusCode: 403
                message: You are not authorized to ingest users for this organization
                error: Forbidden
        '404':
          description: Not found - referenced account not found
          content:
            application/json:
              example:
                statusCode: 404
                message: Account not found
                error: Not Found
        '500':
          description: Internal server error
          content:
            application/json:
              example:
                statusCode: 500
                message: Internal server error
                error: Internal Server Error
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Enter your API key '

````