REST API
The REST API lets your system send files to a project, follow them and act on documents.
Base URL
Every endpoint starts with the team and the project:
https://api.send.ai/v2/{team_id}/project/{project_id}
The upload endpoint under Inbox › Import shows this address for your project, with both IDs filled in. Calls need an API key that is linked to the project, sent as described in Authentication. Call the API from your server; browsers block calls from other websites.
Uploads and tasks
The API speaks of uploads and tasks. An upload is what you send: one or more files. A task, in the API, is one document in one step of the processing pipeline: Split, Segmentation, the Router or a task such as Orders. The step_type of a task says which.
| Method | Endpoint | Does |
|---|---|---|
| POST | /upload | Create an upload |
| GET | /upload/{upload_id} | Get an upload |
| POST | /upload/{upload_id}/move/{folder_id} | Move an upload |
| GET | /task/{task_id} | Get a task |
| GET | /task/{task_id}/tree | Get the tree of a task |
| POST | /task/{task_id}/complete | Complete a task |
| POST | /task/{task_id}/discard | Discard a task |
| POST | /task/{task_id}/report | Report a task |
| POST | /task/{task_id}/unlock | Unlock a task |
| POST | /task/{task_id}/approve | Approve a task |
| POST | /task/{task_id}/disapprove | Disapprove a task |
Responses
Answers are JSON. Successful calls wrap their result in payload; failed calls return an error. See Errors.
Learning about changes
The API has no endpoints that list uploads or tasks. To learn which tasks an upload has and when they change, use notifications: each one carries the IDs of the upload and the task. The extracted data reaches your system through an export action. See Actions.