API Errors and Status Codes
This page documents the HTTP status codes and error response shapes returned by the Liccium APIs. Use this reference to handle errors consistently in your client.
Declaration API
Success
| Code | Description |
|---|---|
| 200 | Declaration accepted successfully. Response includes rayId, message, env, iscc, cidV1, version. |
Client Errors
| Code | Description | Response shape |
|---|---|---|
| 400 | Bad Request – Invalid ISCC, timestamp validation failed, signature verification failed, or TSA verification failed. | ErrorResponse: error, message, optional iscc, jwkError, tsaErrors, providedTimestamp, serverTime. |
| 401 | Unauthorized – Invalid or missing API key. | ErrorResponse: error, message. |
| 405 | Method Not Allowed – Only POST is accepted. | ErrorResponse: error, message. |
| 422 | Unprocessable Entity – Declaration validation failed (schema, structure, or business rules). | ValidationErrorResponse: error, message, validationErrors (array of strings), optional schemaUrl, contextUrl, iscc. |
Server Errors
| Code | Description | Response shape |
|---|---|---|
| 500 | Internal Server Error – Failed to process the declaration. | message, rayId. |
| 502 | Bad Gateway – Failed to fetch or process schema/context. | error, message, optional schemaUrl, contextUrl, iscc. |
ErrorResponse schema
Code
ValidationErrorResponse schema
Code
Example 400 responses
Invalid ISCC:
Code
Timestamp validation failed:
Code
Signature verification failed:
Code
TSA signature verification failed:
Code
Example 422 responses
Schema validation failed:
Code
Structure validation failed:
Code
Metadata and Search APIs
- 401 – Unauthorized (invalid or missing API key). Same
ErrorResponseshape. - 404 – Not Found (e.g. CID not found).
ErrorResponse:error,message. - 410 – Gone. The declaration behind this CID was fully deleted. The body is the public deletion marker (
cid,iscc,status: "deleted",deletedAt,authorizedBy, chain links) and the headerx-declaration-status: deletedis set. Unlike a 404, the CID did exist. See Redaction & Deletion. - 500 – Internal Server Error.
ErrorResponseormessage,rayId.
Successful metadata responses carry the header x-declaration-status with active, redacted or deleted. A redacted declaration is still returned in full; the header is the only signal. Inside a provenance chain, the Search API flags redacted members with metaInternal.redacted: true and deleted members with metaInternal.deleted: true plus their deletionMarker.
Redaction and Deletion API
Routes: POST /v1/redact, GET /v1/redact/jobs/{jobId}, POST /v1/delete, GET /v1/redaction/status/{cid}, and the administrator routes GET /v1/redacted and GET /v1/redaction/stats. Full reference: Redaction API.
| Code | Description |
|---|---|
| 200 | Done, or the declaration already was in the requested state ("changed": false). |
| 202 | Batch redaction accepted; the body carries jobId and statusPath to poll. |
| 207 | Recursive deletion finished with partial failures; per-CID results in the body. |
| 400 | Invalid body, an ISCC instead of a CID, more than 500 CIDs, or a batch sent to /v1/delete. |
| 401 | Missing or invalid API key. |
| 403 | The key is not bound to the declarer of this declaration, deletion is not enabled for it, or recursive was sent without the administrator role. |
| 404 | Unknown CID or job. |
| 410 | The declaration was fully deleted; deletion is terminal, so it can no longer be redacted or un-redacted. |
Error bodies use the ErrorResponse shape with an additional machine-readable code (invalid_cid, forbidden, not_found, deleted).
Best practices
- Always check
errorandmessagefor user-facing messages. - Use
validationErrorsfor 422 to fix payloads field-by-field. - Log
rayIdwhen present for support requests. - Respect rate limits; 429 may be returned with
Retry-Afterwhere applicable.
See also
- Declaration API – Full request/response and examples
- Redaction & Deletion – Redaction, full deletion and the signals verifying parties receive
- General Information – Metadata structure and validation
- Metadata Signature – Signing and validation requirements