Errors
Status codes and the error envelope.
Errors use standard HTTP status codes and a JSON body:
| Status | Meaning |
|---|---|
400 | Malformed request |
401 | Invalid API key |
403 | Missing scope |
404 | Not found, or cross-organization access |
500 | Server failure |
502 | Partial intake failure: the application was created but a document upload failed |
Recovering from a 502 on intake
A 502 from POST /intake means the application exists. Do not retry the
whole intake, which would create a duplicate unless you sent an external_ref.
Retry just the upload against POST /applications/{id}/documents.

