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

# Create contact list

> Create a contact list and get a presigned URL for uploading its CSV file.



## OpenAPI

````yaml api-reference/campaign-audience/openapi.json POST /v1/calls/contact-lists
openapi: 3.0.3
info:
  title: Persistence Campaign Audience API
  version: '1.0'
  description: Manage the contact lists that define who a campaign calls.
servers:
  - url: https://api.persistence.dev
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Campaign audience
    description: Contact list management and CSV upload.
paths:
  /v1/calls/contact-lists:
    post:
      tags:
        - Campaign audience
      summary: Create contact list and get presigned upload URL
      description: >-
        Create a contact list and return a presigned URL for uploading its CSV
        file. Upload the file to `uploadUrl`, then confirm the upload to import
        the contacts.
      operationId: createContactList
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactListCreateRequest'
        description: Contact list creation request with file name
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactListCreateResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ContactListCreateRequest:
      type: object
      required:
        - fileName
        - name
        - type
      properties:
        fileName:
          type: string
        name:
          type: string
        type:
          $ref: '#/components/schemas/ContactListType'
    ContactListCreateResponse:
      type: object
      properties:
        createdAt:
          type: string
        id:
          type: string
        name:
          type: string
        s3Key:
          type: string
        status:
          $ref: '#/components/schemas/ContactListStatus'
        totalEntries:
          type: integer
        type:
          $ref: '#/components/schemas/ContactListType'
        updatedAt:
          type: string
        uploadDetails:
          $ref: '#/components/schemas/Upload'
        uploadHeaders:
          type: object
          additionalProperties:
            type: string
        uploadUrl:
          type: string
    Error:
      type: object
      properties:
        code:
          type: string
        error:
          type: string
    ContactListType:
      type: string
      enum:
        - contacts
        - dnd
        - batch
      x-enum-varnames:
        - ContactListTypeContacts
        - ContactListTypeDND
        - ContactListTypeBatch
    ContactListStatus:
      type: string
      enum:
        - ready
        - draft
        - archived
      x-enum-varnames:
        - ContactListStatusReady
        - ContactListStatusDraft
        - ContactListStatusArchived
    Upload:
      type: object
      properties:
        errorReportS3Key:
          type: string
        errorReportUrl:
          type: string
        errors:
          type: array
          items:
            type: integer
        id:
          type: string
        metadata:
          $ref: '#/components/schemas/UploadMetadata'
        processedAt:
          type: string
        s3Key:
          type: string
        status:
          $ref: '#/components/schemas/UploadStatus'
        uploadedAt:
          type: string
        validatedAt:
          type: string
    UploadMetadata:
      type: object
      properties:
        duplicateRows:
          type: integer
        importedRows:
          type: integer
        invalidRows:
          type: integer
        totalRows:
          type: integer
        validRows:
          type: integer
    UploadStatus:
      type: string
      enum:
        - uploaded
        - validating
        - validation_failed
        - validated
        - processing
        - processed
        - failed
      x-enum-varnames:
        - UploadStatusUploaded
        - UploadStatusValidating
        - UploadStatusValidationFailed
        - UploadStatusValidated
        - UploadStatusProcessing
        - UploadStatusProcessed
        - UploadStatusFailed
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key issued for your workspace.

````