Skip to main content
POST
Add Documents
Use this API to add documents with metadata to an organization.

Endpoint

POST https://api.velt.dev/v2/organizations/documents/add

Headers

string
required
Your API key.
string
required

Body

Params

object
required

Example Requests

1. Create new documents

2. Create new documents in a specific folder

Response

Success Response

Failure Response

Partial Failures

When only some of the documents in the batch fail, this endpoint returns HTTP 500 and puts a per-item breakdown in error.details, keyed by the document IDs you sent.
A partial failure is reported as 500 INTERNAL even when nothing actually went wrong on the server, such as when a document simply does not exist. Branch on the per-item code rather than the HTTP status when deciding whether to retry. Retrying on the status alone will loop on already-exists, which will never succeed.
string
Why this particular item failed. Present on every entry with "success": false.