# Upload document

Upload a signed document to the system in order to run subsequent operations (signature report, verification, content extraction, etc.).
You can upload:
* **a single signed file** (embedded signature), or
* **two separate files**: the main document plus a **detached signature**.

The request must be `multipart/form-data`.
Notes:
* The optional `verification_date` fixes the verification date used by VOL; if omitted VOL chooses a date depending on the verification profile.

Endpoint: POST /documents/
Version: 1.0
Security: AuthToken

## Security:

  - `AuthToken` (unknown)
    apiKey in header Authorization

## Request fields (multipart/form-data):

  - `document` (string, required)
    Main document to upload (must be signed when using embedded signatures)

  - `content` (string)
    Detached signature (optional). If omitted, VOL searches for the signature inside `document`.

  - `verification_date` (string)
    Verification date to be used by VOL.
The documentation describes this as a form field named `verification_date`.
    Example: 2017-12-20T11:46:36.862950

## Response 201:

  - `201` (unknown)
    Document uploaded successfully

## Response 201 fields (application/json):

  - `code` (string, required)
    Example: 201 Created

  - `location` (string, required)
    Relative URL to access the uploaded document (contains `document-id`)
    Example: /documents/e4d13719410fae2f

## Response 201 headers (application/json):

  - `location` (string)
    Relative URL of the uploaded document (contains the unique `document-id`)
    Example: /documents/e4d13719410fae2f

## Response 400:

  - `400` (unknown)
    Bad Request (multipart parsing / invalid boundary)

## Response 400 fields (application/json):

  - `title` (string)

  - `description` (string)

  - `code` (string)

  - `message` (string)

## Response 401:

  - `401` (unknown)
    Unauthorized (invalid or missing token)

## Response 401 fields (application/json):

  - `title` (string)

  - `description` (string)

  - `code` (string)

  - `message` (string)

## Response 502:

  - `502` (unknown)
    Upstream/service error (HTML body)

## Response 201 examples:

  - `ok` (unknown)

## Response 400 examples:

  - `invalidBoundary` (unknown)

## Response 401 examples:

  - `invalidToken` (unknown)

