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

# Uploadtaak aanmaken

> Maakt een uploadtaak aan en retourneert een vooraf ondertekende S3-URL. Upload het bestand rechtstreeks naar die URL en roep daarna `POST /uploads/{job_id}/complete` aan.



## OpenAPI

````yaml nl/api-reference/openapi.yaml post /api/v1/{workspace_slug}/uploads
openapi: 3.1.0
info:
  title: Anlytic API
  version: '1.0'
  description: >-
    De Anlytic REST API. Alle endpoints zijn beschikbaar onder `/api/v1/`.


    ## Authenticatie


    Voor de meeste endpoints is een **Bearer JWT** nodig die je via de
    authenticatiestroom verkrijgt:

    1. `GET /api/v1/users/otp` — vraag een eenmalige toegangscode aan met HTTP
    Basic Auth.

    2. `GET /api/v1/users/token/{kid}` — wissel de code in voor een
    werkruimte-JWT.


    Stuur de JWT bij elke volgende aanvraag mee als `Authorization: Bearer
    <token>`.


    Je kunt ook een **API-sleutel** via dezelfde header gebruiken:
    `Authorization: API-Key <key>`.
  contact:
    name: Anlytic Support
    url: https://anlytic.com
servers:
  - url: https://app.anlytic.com
    description: Productie
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Configuratie
    description: API-configuratie en beleid
  - name: Triggers
    description: Geplande grafiektriggers en triggeracties
paths:
  /api/v1/{workspace_slug}/uploads:
    post:
      tags:
        - Uploads
      summary: Uploadtaak aanmaken
      description: >-
        Maakt een uploadtaak aan en retourneert een vooraf ondertekende S3-URL.
        Upload het bestand rechtstreeks naar die URL en roep daarna `POST
        /uploads/{job_id}/complete` aan.
      operationId: createUploadJob
      parameters:
        - $ref: '#/components/parameters/workspaceSlug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewUploadJob'
      responses:
        '201':
          description: Resource aangemaakt
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadJob'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  parameters:
    workspaceSlug:
      name: workspace_slug
      in: path
      required: true
      schema:
        type: string
        example: acme
      description: URL-vriendelijke werkruimte-identificatie
      example: acme
  schemas:
    NewUploadJob:
      type: object
      required:
        - type
        - table
        - format
        - file_name
        - file_size_bytes
      properties:
        type:
          type: string
          enum:
            - create
            - append
            - replace
            - extend
        hot_reload:
          type: boolean
          default: false
        table:
          type: object
          required:
            - source_id
            - table_name
          properties:
            source_id:
              $ref: '#/components/schemas/UUID'
            table_name:
              type: string
            schema:
              type: string
        format:
          type: string
          enum:
            - csv
            - json
            - parquet
        file_name:
          type: string
        file_size_bytes:
          type: integer
        delimiter:
          type: string
          default: ','
        exclude_header:
          type: boolean
          default: false
        column_mapping:
          type: array
          items:
            type: object
            required:
              - source_column
              - destination_column
            properties:
              source_column:
                type: string
              destination_column:
                type: string
        table_settings:
          type: object
          additionalProperties: true
    UploadJob:
      type: object
      properties:
        job_id:
          $ref: '#/components/schemas/UUID'
        status:
          type: string
          enum:
            - pending
            - uploading
            - processing
            - complete
            - failed
            - cancelled
        file_name:
          type: string
        warnings:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
        error:
          type: string
        created_at:
          $ref: '#/components/schemas/Timestamp'
        updated_at:
          $ref: '#/components/schemas/Timestamp'
        upload:
          type: object
          properties:
            method:
              type: string
              enum:
                - PUT
                - POST
            url:
              type: string
              format: uri
              description: Vooraf ondertekende S3-upload-URL
            headers:
              type: object
              additionalProperties:
                type: string
            expires_at:
              $ref: '#/components/schemas/Timestamp'
    UUID:
      type: string
      format: uuid
      example: 550e8400-e29b-41d4-a716-446655440000
    Timestamp:
      type: string
      format: date-time
      example: '2024-01-15T10:30:00Z'
    Error:
      type: object
      properties:
        error:
          type: string
          description: Voor mensen leesbare foutmelding
        code:
          type: string
          description: Machineleesbare foutcode
  responses:
    Unauthorized:
      description: Authenticatietoken ontbreekt of is ongeldig
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Onvoldoende rechten
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Stuur een geldig token mee via de header `Authorization: Bearer
        <token>`.
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Voer `API-Key <key>` in.

````