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

# Create a File Upload URL

> Creates a temporary URL for uploading a CSV file to a preconfigured Sela file ingestion source. The source value is provided by Sela and determines how the uploaded CSV is processed. Sela configures which CSV column is used as the row lookup key. First call this endpoint with a source and filename, then upload the file to the returned signed_url using an HTTP PUT request. The upload URL expires after one hour.



## OpenAPI

````yaml /Sela_API.yaml post /api/ingestion/upload/
openapi: 3.0.3
info:
  title: Sela API
  version: 1.0.2
  description: Voice AI agents with superhuman conversion rates
servers:
  - url: https://api.trysela.com/
    description: Production API
security: []
paths:
  /api/ingestion/upload/:
    post:
      tags:
        - File Ingestion
      summary: Create a File Upload URL
      description: >-
        Creates a temporary URL for uploading a CSV file to a preconfigured Sela
        file ingestion source. The source value is provided by Sela and
        determines how the uploaded CSV is processed. Sela configures which CSV
        column is used as the row lookup key. First call this endpoint with a
        source and filename, then upload the file to the returned signed_url
        using an HTTP PUT request. The upload URL expires after one hour.
      operationId: ingestion_upload_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadFileRequestRequest'
            examples:
              RequestUploadURL:
                value:
                  source: crm_export
                  filename: may-leads.csv
                summary: Request upload URL
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/UploadFileRequestRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadFileRequestRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadFileResponse'
              examples:
                UploadURLCreated:
                  value:
                    signed_url: >-
                      https://storage.example.com/upload/path?X-Amz-Signature=example
                  summary: Upload URL created
          description: Temporary upload URL created successfully.
        '400':
          description: Invalid source or filename.
        '500':
          description: Internal server error while creating upload URL.
        '503':
          description: Upload service is temporarily unavailable.
      security:
        - tokenAuth: []
      x-codeSamples:
        - lang: curl
          label: RequestUploadURL
          source: |-
            curl --request POST \
              --url https://api.trysela.com/api/ingestion/upload/ \
              --header 'Authorization: Token <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
                "source": "crm_export",
                "filename": "may-leads.csv"
              }'
components:
  schemas:
    UploadFileRequestRequest:
      type: object
      properties:
        source:
          type: string
          minLength: 1
          description: >-
            Short label for the upload source, such as the system or workflow
            sending the file. Use letters, numbers, hyphens, and underscores
            only.
          maxLength: 50
          pattern: ^[a-zA-Z0-9_\-]+$
        filename:
          type: string
          minLength: 1
          description: >-
            Name of the file you plan to upload. The filename must start with a
            letter or number and may include spaces, dots, hyphens, and
            underscores.
          maxLength: 255
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9_\-. ]*$
      required:
        - filename
        - source
    UploadFileResponse:
      type: object
      properties:
        signed_url:
          type: string
          format: uri
          description: >-
            Temporary URL where you can upload the file directly with an HTTP
            PUT request. The URL expires after one hour.
      required:
        - signed_url
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````