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

# Bestand Upload Aanmaken

> Genereer een vooraf ondertekende URL voor het uploaden van een JSON-bestand. Na het uploaden moet je de [voltooien endpoint](/api-reference/files/complete) aanroepen om de upload te finaliseren.



## OpenAPI

````yaml nl/openapi/files.json POST /v1/files
openapi: 3.0.3
info:
  title: Bestanden API
  version: 1.0.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/files:
    post:
      summary: Maak Bestand Upload
      description: >-
        Genereer een vooraf ondertekende URL voor het uploaden van een
        JSON-bestand. Na het uploaden moet je de complete endpoint aanroepen om
        de upload te voltooien. De upload URL verloopt na 10 minuten.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                filename:
                  type: string
                  description: >-
                    De bestandsnaam voor het bestand. Moet eindigen met de .json
                    extensie.
                  pattern: \.json$
                purpose:
                  type: string
                  description: >-
                    Het doel van het bestand. Ondersteunde waarden: 'context' of
                    'batch'. Standaard is 'context'.
                  enum:
                    - context
                    - batch
                  default: context
              required:
                - filename
      responses:
        '200':
          description: Succesvolle reactie met upload URL.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Bestand ID
                  object:
                    type: string
                    description: Het soort object. "file.upload" voor deze endpoint.
                  created:
                    type: integer
                    description: Gemaakt epoch tijdstempel
                  upload_url:
                    type: string
                    format: uri
                    description: >-
                      Vooraf ondertekende URL voor het uploaden van het bestand.
                      Verloopt na 10 minuten.
                  expires_in:
                    type: integer
                    description: >-
                      Aantal seconden totdat de upload URL verloopt (600
                      seconden = 10 minuten)
        '400':
          description: >-
            Foute aanvraag. Ontbrekende bestandsnaam of ongeldig bestandstype
            (alleen .json bestanden worden ondersteund).
        '401':
          description: Ongeldige API-sleutel
        '500':
          description: Interne serverfout
      security:
        - Authorization: []
components:
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: >-
        Bearer authenticatie header in de vorm Bearer <token>, waar <token> jouw
        auth token is.

````