Files

Upload a file

Creates a new file

POST
/v1/files

Authorization

x-api-key
<token>

API Key for authentication

In: header

Request Body

multipart/form-dataOptional
namerequired
string

The name of the file

Minimum length: 1Maximum length: 30
filerequired
file

The file to upload

Format: "binary"

Response Body

The response for a file. Properties depend on the file type.

TypeScript Definitions

Use the response body type in TypeScript.

responserequired
File Response

The response for a file. Properties depend on the file type.

curl -X POST "https://api.scan-documents.com/v1/files" \
  -H "x-api-key: <token>" \
  -F name="File Name" \
  -F file="string"
{
  "id": "file_euyrvozb9302uwhq",
  "name": "Example Image",
  "type": "image/png",
  "properties": {
    "size": 1024,
    "width": 800,
    "height": 600
  },
  "task_id": null,
  "created_at": "2021-05-01T12:00:00Z"
}