Files

Upload a file

Creates a new file

POST
/v1/files
x-api-key
<token>

API Key for authentication

In: header

namerequired
FileName

The name of the file

Length1 <= length <= 50
filerequired
file

The file to upload

Formatbinary

Response Body

curl -X POST "https://api.scan-documents.com/v1/files" \  -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"
}
{
  "type": "https://scan-documents.com/docs/errors/validation-error",
  "title": "Validation Error",
  "status": 422,
  "errors": {
    "{field}": [
      "{error}."
    ]
  }
}
{
  "type": "https://scan-documents.com/docs/errors/rate-limit-error",
  "title": "Rate Limit Exceeded",
  "status": 429,
  "message": "Rate limit exceeded. Please try again later or contact support."
}
{
  "type": "https://scan-documents.com/docs/errors/internal-error",
  "title": "An unexpected error occurred. Contact support if the problem persists.",
  "status": 500,
  "message": "An unexpected error occurred. Contact support if the problem persists."
}