For AI agents: a documentation index is available at https://docs.coverbase.com/llms.txt — this page is also available in markdown by appending .md to the URL.
A document (cbvdoc_...) is an evidence file (SOC 2 report, pentest report, policy, contract, questionnaire, diagram, …) that belongs to a vendor (cbvndr_...). A document can additionally be linked to any number of that vendor’s services (cbsvc_...) and assessments (cbqsrw_...).
Use this API to upload a document, attach it where it belongs, list and inspect documents, fetch a short-lived download URL, re-link, and archive.
All endpoints are org-scoped to the API key. See API conventions for authentication, IDs, timestamps, idempotency, pagination, and the error envelope.
| Method | Path | Idempotent |
|---|---|---|
POST | /v1/documents | Yes (Idempotency-Key) |
GET | /v1/documents | — |
GET | /v1/documents/{document_id} | — |
GET | /v1/documents/{document_id}/download | — |
PATCH | /v1/documents/{document_id} | No |
DELETE | /v1/documents/{document_id} | No |
Smart limits. Uploads are capped at 100 MiB per file. Allowed file
types:
pdf, doc, docx, rtf, txt, md, xls, xlsx, xlsm, csv,
ppt, pptx, png, jpg, jpeg, gif, webp, zip. Anything else is
rejected with 400 unsupported_file_type; an oversized file is rejected with
413 file_too_large. List responses page at limit 1–200 (default 50).Upload a document
POST /v1/documentsmultipart/form-data — send the file plus its links in one call. Returns
201 Created with the document object.
After upload, Coverbase asynchronously classifies the document (and, where
applicable, runs AI analysis). The returned status reflects this in-progress
state; poll GET /v1/documents/{document_id} to observe it settle.
Form fields
The document file (
multipart/form-data part).The owning vendor ID (
cbvndr_...).Service IDs (
cbsvc_...) to link the document to. Repeat the form field once
per service.Assessment IDs (
cbqsrw_...) to attach the document to as supporting evidence.Optional document type slug (e.g.
soc2_type2_auditor_report,
penetration_test_report, commercial_contract). Omit it to let Coverbase
infer the type from the file. An unknown slug returns 422 invalid_document_type.Optional display name. Defaults to the uploaded filename.
Headers
Bearer ak_...Optional. Replaying the same key within 24 hours returns the original
201 body. See Idempotency.Example request
Example response
201 Created — the document object:
The document object
Document ID (
cbvdoc_...).Owning vendor ID.
Display name.
Normalized file extension (no leading dot).
File size in bytes.
The classified/declared document type slug, or
null if not yet classified.Processing status (e.g.
created, analyzing, complete).Linked service IDs.
Assessments the document is attached to.
Creation time (Unix epoch seconds).
Last-update time (Unix epoch seconds).
List documents
GET /v1/documentsOnly documents owned by this vendor.
Only documents linked to this service.
Only documents attached to this assessment.
Page size, 1–200 (default 50).
Pagination offset (default 0).
cURL
Get a document
GET /v1/documents/{document_id}404 document_not_found.
cURL
Download a document
GET /v1/documents/{document_id}/downloadurl with a plain GET (no Authorization header) to fetch the
bytes — it serves the file as an attachment with the original filename.
cURL
Update a document
PATCH /v1/documents/{document_id}service_ids / assessment_ids
replaces the existing set (pass [] to clear it).
Replacement display name.
Replacement document type slug.
Replaces the set of linked services.
Replaces the set of attached assessments.
cURL
Archive a document
DELETE /v1/documents/{document_id}cURL
Attaching documents to assessments
There are two ways to link a document to an assessment:- At upload time — pass
assessment_idstoPOST /v1/documents(orservice_idsto attach to services). - At assessment-create time — upload the document first, then pass its ID
in
supporting_document_idswhen callingPOST /v1/assessments. - Later —
PATCH /v1/documents/{document_id}withassessment_ids/service_ids.
Errors
| Status | code | When |
|---|---|---|
400 | unsupported_file_type | The file extension is not in the allowlist. |
413 | file_too_large | The file exceeds the 100 MiB limit. |
422 | invalid_document_type | document_type is not a known slug. |
404 | vendor_not_found | The vendor_id does not exist in your org. |
404 | document_not_found | The document does not exist in your org. |
404 | assessment_not_found | A filtered assessment_id does not exist. |
409 | document_not_ready | The document has no stored file to download yet. |