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

# Create a campaign from a CSV

> Creates or starts a campaign only when every CSV row is valid. A file with an invalid phone, invalid email, or a duplicate number is rejected and nothing is saved or dialed. Phone numbers must be E.164, like +14155552671. Spaces and punctuation are removed, and a leading 00 is converted to +. Send multipart field file plus name and agentId. Set launch to true to dial immediately, or scheduled with startTime, endTime, and timezone. Optional phoneColumn, nameColumn, and emailColumn override the headers.



## OpenAPI

````yaml /openapi.json post /public/v1/campaigns/csv
openapi: 3.0.3
info:
  title: Callin Public API
  version: 1.0.0
  description: >-
    The Callin public API lets you programmatically build and manage AI voice
    agents, control their knowledge bases, and retrieve call logs and
    transcripts. All endpoints are versioned under /public/v1.
servers:
  - url: https://api.callin.io/api
    description: API Endpoint
security: []
tags:
  - name: Health
    description: Service availability check. No authentication required.
  - name: Identity
    description: Verify which account is associated with the current API key.
  - name: Agents
    description: Create, retrieve, and update AI voice agents.
  - name: Conversations
    description: List and inspect call logs, transcripts, and conversation details.
  - name: Knowledge Base
    description: Manage documents and groups that agents use during calls.
  - name: Campaigns
    description: ...
  - name: Contacts
    description: ...
paths:
  /public/v1/campaigns/csv:
    post:
      tags:
        - Campaigns
      summary: Create a campaign from a CSV
      description: >-
        Creates or starts a campaign only when every CSV row is valid. A file
        with an invalid phone, invalid email, or a duplicate number is rejected
        and nothing is saved or dialed. Phone numbers must be E.164, like
        +14155552671. Spaces and punctuation are removed, and a leading 00 is
        converted to +. Send multipart field file plus name and agentId. Set
        launch to true to dial immediately, or scheduled with startTime,
        endTime, and timezone. Optional phoneColumn, nameColumn, and emailColumn
        override the headers.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateCampaignCsvUpload'
      responses:
        '201':
          description: Campaign created from a valid CSV
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessCampaignResponse'
        '400':
          description: >-
            CSV is not valid. The campaign was not created. error.details
            contains the row report.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyHeader: []
        - BearerAuth: []
        - ApiKeyQuery: []
components:
  schemas:
    CreateCampaignCsvUpload:
      type: object
      required:
        - file
        - name
        - agentId
      properties:
        file:
          type: string
          format: binary
          description: UTF-8 .csv. Every phone number must be E.164.
        name:
          type: string
        agentId:
          type: string
          format: uuid
        launch:
          type: boolean
          default: false
        scheduled:
          type: boolean
          default: false
        startTime:
          type: string
        endTime:
          type: string
        timezone:
          type: string
        phoneColumn:
          type: string
        nameColumn:
          type: string
        emailColumn:
          type: string
        followUpCall:
          type: boolean
        followUpAttempts:
          type: integer
        followUpIntervals:
          type: string
          description: Comma-separated delays in minutes, one per follow-up attempt.
    SuccessCampaignResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/Campaign'
        warning:
          type: string
        requestId:
          type: string
          nullable: true
    ErrorResponse:
      type: object
      description: >-
        Returned for most client and validation errors. Read `error.message` and
        optional `error.fields` for details.
      properties:
        success:
          type: boolean
          example: false
          description: Always `false` for this shape.
        error:
          type: object
          description: Structured error payload from the API.
          properties:
            code:
              type: string
              description: Stable machine-oriented error code when provided.
            message:
              type: string
              description: Human-readable explanation suitable to show or log.
            status:
              type: integer
              description: HTTP status code echoed for convenience.
            fields:
              type: array
              description: >-
                Optional per-field validation issues (shape is
                endpoint-specific).
              items:
                type: object
    Campaign:
      type: object
      properties:
        campaignId:
          type: string
        name:
          type: string
        agentId:
          type: string
        active:
          type: boolean
        scheduled:
          type: boolean
        startTime:
          type: string
          nullable: true
        endTime:
          type: string
          nullable: true
        timezone:
          type: string
          nullable: true
        status:
          type: string
        startIndex:
          type: integer
        contactCount:
          type: integer
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/CampaignContact'
        followUp:
          type: object
          properties:
            enabled:
              type: boolean
            attempts:
              type: integer
            intervalsMinutes:
              type: array
              items:
                type: integer
        metadata:
          type: object
          properties:
            createdAt:
              type: string
              nullable: true
            updatedAt:
              type: string
              nullable: true
            deletedAt:
              type: string
              nullable: true
    CampaignContact:
      type: object
      required:
        - phoneNumber
      properties:
        contactId:
          type: string
          nullable: true
        phoneNumber:
          type: string
        name:
          type: string
        email:
          type: string
      additionalProperties: true
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: Send your Callin API key in the `x-api-key` header.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Same API key as a Bearer token: `Authorization: Bearer <your-api-key>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.