DocumentationAPI Reference
ApiAPI ReferenceDocuments

Upload or register a document for analysis

Registers a contract for analysis. Provide either a public HTTPS URL or a multipart file upload. The document is copied into OutRiskAI storage at submission time and analysis is queued in the background, so the response returns immediately. Requires the documents:write scope.

POST
/documents

Registers a contract for analysis. Provide either a public HTTPS URL or a multipart file upload. The document is copied into OutRiskAI storage at submission time and analysis is queued in the background, so the response returns immediately. Requires the documents:write scope.

Authorization

bearerAuth
headerAuthorizationBearer <API Key>

An OutRiskAI API key, sent as a bearer token. Create keys in the dashboard under Settings; the secret is shown only once.

Header Parameters

Idempotency-Key*string

Unique key for safe retries, at most 255 characters. Reusing a key with the same payload replays the original response; reusing it with a different payload returns 409.

Lengthlength <= 255

Request Body

  1. body
document_url*string

Public https URL (port 443) to a PDF, PNG or JPEG of at most 20 MB

Formaturi
Lengthlength <= 2048

Response Body

Document accepted and queued for processing

application/json
  1. response
success*boolean
data*
error*
Example Request
curl -X POST 'https://outriskai.com/api/public/v1/documents' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "document_url": "http://example.com"}'
Example Response
{  "success": true,  "data": {    "document": {      "id": "string",      "title": "string",      "status": "pending",      "uploaded_at": "2019-08-24T14:15:22Z"    },    "job": {      "id": "string",      "status": "queued",      "current_step": 0    }  },  "error": {}}