Dynamiq
Runs

Upload a file

Uploads a file to the app's storage so it can later be attached to a run via `file_ids`. The maximum request size is 128 MiB.

POST
/v1/files

Authorization

accessKey
AuthorizationBearer <token>

Organization or project Access Key created in the Dynamiq console. Used for deployed-app (Runs API), AI Gateway, traces collector, and management API requests. Send as Authorization: Bearer <access-key>.

In: header

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/files" \  -F file="string"
{
  "data": {
    "id": "0b54a6d2-9c1f-4f7e-8a36-2f6d1d2c9b11",
    "name": "ticket-4812-screenshot.png",
    "size": 482133,
    "mime_type": "image/png"
  }
}
{
  "error": {
    "code": "bad_request",
    "message": "Bad Request",
    "details": {
      "input": "cannot be blank"
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Unauthorized"
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Not Found"
  }
}