---
title: "Upload a new doc to the inbox"
method: POST
path: "/documents/{inbox_id}"
tags: ["documents"]
---

# Upload a new doc to the inbox

`POST /documents/{inbox_id}`

This endpoint uploads a new file to the given inbox and will process the file.

## Upload mode: sync

When sync=true (default), the call will block and wait for the processing to complete.

If you have a custom output configured (this is set by contract.fit team),
passing mimetype *application/vnd.cf.custom* will allow you to get the custom output formatted result

Since it might yield inconsistent results if a timeout is raised while waiting,
it is recommended to use the **async** mode.

## Upload mode: async

When sync=false, the call will schedule the processing and return without waiting for completion.
It will return the document ID, so that the processed document can be retrieved at a later date.

**Permission required:** upload

## Response `200`

Success

## Other responses

- `403` — Permission insufficient
- `415` — Image Recognition Error

---

[API](https://skmtc.net/contractp/apis/contract-p.md) · [All operations](https://skmtc.net/contractp/apis/contract-p/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/contractp/contract-p/versions/8ce53ebd6bd3/schema)
