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

# Batch upsert contacts

> Upserts up to 1,000 contacts in one transaction. New emails come back `CREATED`, existing ones `UPDATED`. This is the reliable create-or-update path for both new and existing contacts (single `POST` is create-only).



## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/contacts/batch
openapi: 3.1.0
info:
  title: Inflection Developer API
  version: '1.0'
  description: >-
    A REST API for reading and writing the people in your Inflection workspace:
    their profiles, product and marketing activity, static lists, and emails.
servers:
  - url: https://api.inflection.io
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/contacts/batch:
    post:
      tags:
        - Contacts
      summary: Batch upsert contacts
      description: >-
        Upserts up to 1,000 contacts in one transaction. New emails come back
        `CREATED`, existing ones `UPDATED`. This is the reliable
        create-or-update path for both new and existing contacts (single `POST`
        is create-only).
      operationId: batchUpsertContacts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contacts:
                  type: array
                  items:
                    type: object
                    properties:
                      email:
                        type: string
                        format: email
                      properties:
                        $ref: '#/components/schemas/ContactProperties'
            example:
              contacts:
                - email: jane@acme.com
                  properties:
                    first_name: Jane
                - email: raj@globex.com
                  properties:
                    company_name: Globex
      responses:
        '200':
          description: Batch enqueued as a PENDING transaction.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Transaction'
components:
  schemas:
    ContactProperties:
      type: object
      description: >-
        Keys must be snake_case. camelCase keys are silently ignored (saved as
        null).
      properties:
        first_name:
          type: string
        last_name:
          type: string
        company_name:
          type: string
        _source:
          type: string
          description: Set by Inflection to identify the write source.
      additionalProperties: true
    Envelope:
      type: object
      properties:
        data:
          description: 'Payload: object or array, shape depends on the endpoint.'
        pagination:
          type: object
          description: Present only on paged list endpoints.
          properties:
            pageNumber:
              type: integer
              example: 1
            pageSize:
              type: integer
              example: 20
            totalElements:
              type: integer
              example: 151
            totalPages:
              type: integer
              example: 8
        errors:
          type: array
          items:
            type: object
            properties:
              errorCode:
                type: string
              message:
                type: string
              detail:
                type: string
        meta:
          type: object
          properties:
            status:
              type: string
              enum:
                - SUCCESS
                - FAILURE
            timestamp:
              type: string
              format: date-time
    Transaction:
      type: object
      properties:
        transactionId:
          type: string
          example: 34-7e8009a7-2c91-409e-b5ac-0f1144a0cc7d
        status:
          type: string
          enum:
            - PENDING
            - DONE
            - NOT_EXIST
        data:
          type: object
          description: Present when status is DONE.
          properties:
            results:
              type: array
              items:
                type: object
                properties:
                  email:
                    type: string
                  status:
                    type: string
                    enum:
                      - CREATED
                      - UPDATED
                      - NO_CHANGE
                      - FAILED
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Personal Access Token or OAuth 2.1 access token, sent as a bearer
        credential. READ permission for GET, WRITE for POST/PATCH/DELETE.

````