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

# Upload Calls

> Upload a batch of call records to a campaign.

**Request body:** A JSON array of call objects. Each object must include a `phone_number` field.
Along with optional `override_assistant_id`, `override_schedule` and `override_timezone` fields
and you can include any additional fields relevant to the call (e.g. `patientId`, `insuranceId`, etc.).
These extra fields are dynamic variables from attached assistant or workflow and will be stored as part of the call record's payload for use in the campaign.

Calls can be uploaded while the campaign is already running — they will be picked up automatically.
Returns `202 Accepted` immediately; actual call processing happens asynchronously.



## OpenAPI

````yaml https://api-prod.interactly.ai/api-docs/campaigns/api.json post /campaigns/v1/campaigns/{campaign_id}/calls
openapi: 3.1.0
info:
  title: Interactly API
  description: API for building interactly.ai services
  version: 1.1.0
  contact:
    name: Interactly
    url: https://interactly.ai
    email: developers@interactly.ai
servers:
  - url: https://api-prod.interactly.ai
    description: API Server
security: []
paths:
  /campaigns/v1/campaigns/{campaign_id}/calls:
    post:
      tags:
        - Campaigns Calls
        - Campaign Calls
      summary: Upload Calls
      description: >-
        Upload a batch of call records to a campaign.


        **Request body:** A JSON array of call objects. Each object must include
        a `phone_number` field.

        Along with optional `override_assistant_id`, `override_schedule` and
        `override_timezone` fields

        and you can include any additional fields relevant to the call (e.g.
        `patientId`, `insuranceId`, etc.).

        These extra fields are dynamic variables from attached assistant or
        workflow and will be stored as part of the call record's payload for use
        in the campaign.


        Calls can be uploaded while the campaign is already running — they will
        be picked up automatically.

        Returns `202 Accepted` immediately; actual call processing happens
        asynchronously.
      operationId: >-
        campaigns_service_create_campaigns_calls_v1_campaigns__campaign_id__calls_post
      parameters:
        - name: campaign_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/PydanticObjectId'
            description: Campaign configuration ID
          description: Campaign configuration ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                additionalProperties: true
                description: >-
                  One call record in an upload batch. Extra fields are stored as
                  call payload.
                properties:
                  phone_number:
                    type: string
                    title: Phone Number
                    description: >-
                      Target phone number (E.164 format recommended, e.g.
                      '+12065551234')
                  override_assistant_id:
                    anyOf:
                      - type: string
                      - type: 'null'
                    title: Override Assistant Id
                    description: >-
                      Override the campaign's default AI assistant for this
                      specific call
                  override_timezone:
                    anyOf:
                      - type: string
                      - type: 'null'
                    title: Override Timezone
                    description: >-
                      IANA timezone override for this call's scheduling window
                      (e.g. 'America/Chicago')
                  override_schedule:
                    anyOf:
                      - items:
                          properties:
                            startAt:
                              anyOf:
                                - type: string
                                  format: date-time
                                - type: 'null'
                              title: Startat
                              description: Schedule start datetime
                            endAt:
                              anyOf:
                                - type: string
                                  format: date-time
                                - type: 'null'
                              title: Endat
                              description: Schedule end datetime
                          type: object
                          title: Schedule
                          description: >-
                            Represents a schedule for processing calls.

                            This model includes the start and end times for the
                            schedule,

                            allowing for flexible scheduling of call processing.
                        type: array
                      - type: 'null'
                    description: >-
                      Call window override — each entry has 'startAt' and
                      'endAt' as ISO 8601 strings
                    title: Override Schedule
                required:
                  - phone_number
                title: UploadCallItem
                type: object
            example:
              - phone_number: '+12065551234'
                override_timezone: America/Chicago
                patientId: P-12345
                insuranceId: INS-67890
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '202':
          description: Calls accepted for processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadCallsResponse'
        '400':
          description: Bad request — invalid input or constraint violation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Requested resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearer: []
components:
  schemas:
    PydanticObjectId:
      type: string
      maxLength: 24
      minLength: 24
      pattern: ^[0-9a-f]{24}$
      example: 5eb7cf5a86d9755df3a6c593
    UploadCallsResponse:
      properties:
        message:
          type: string
          title: Message
          description: Result description
          examples:
            - Received batch calls triggers successfully.
        data:
          $ref: '#/components/schemas/UploadCallsBatchData'
          description: Details of the accepted upload batch
      type: object
      required:
        - message
        - data
      title: UploadCallsResponse
    ErrorResponse:
      properties:
        message:
          type: string
          title: Message
          description: Human-readable error description
          examples:
            - Resource not found.
      type: object
      required:
        - message
      title: ErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UploadCallsBatchData:
      properties:
        callIds:
          items:
            type: string
          type: array
          title: Callids
          description: IDs of the call records created in this batch
        requestId:
          type: string
          title: Requestid
          description: Unique batch identifier — use for tracing and support
      type: object
      required:
        - callIds
        - requestId
      title: UploadCallsBatchData
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: >-
        Retrieve your API Key from [Dashboard API Keys
        Section](https://dashboard.interactly.ai/api-keys).

````