Confidential docs API
7 operations. Back to the API overview. Examples use synthetic data.
Session open
POST /admin/v1/build-sessions
Needs the permission: documents:confidential_build.
Request body
| Field | Type | Presence | Description |
|---|---|---|---|
hours | integer | optional | - |
max_reads | integer | optional | - |
request_ref | string | optional | - |
{
"hours": 1,
"max_reads": 1,
"request_ref": "example"
}Response 201
{}Other responses
401Authentication required403Not permitted404Not Found503Unavailable (nothing was changed)
curl --request POST \
--header "Authorization: Bearer $ID_TOKEN" \
--header "Content-Type: application/json" \
--data '{"hours":1,"max_reads":1,"request_ref":"example"}' \
"https://YOUR-CONSOLE-HOST/admin/v1/build-sessions"Session documents
GET /admin/v1/build-sessions/{id}/documents
Needs the permission: documents:confidential_build.
Parameters
| Name | In | Type | Presence | Description |
|---|---|---|---|---|
id | path | string | required | - |
Response 200
| Field | Type | Presence | Description |
|---|---|---|---|
documents | any | optional | - |
session | object (DbBuildSession) | optional | BuildSession is one build factory session for a request. |
session.expires_at | string (date-time) | optional | - |
session.id | string | optional | - |
session.max_reads | integer | optional | - |
session.opened_at | string (date-time) | optional | - |
session.opened_by | string | optional | - |
session.reads | integer | optional | - |
session.request_ref | string | optional | - |
session.revoked_at | string (date-time) | optional | - |
session.revoked_by | string | optional | - |
{
"documents": {},
"session": {
"expires_at": "2026-01-15T14:30:00Z",
"id": "example-id",
"max_reads": 1,
"opened_at": "2026-01-15T14:30:00Z",
"opened_by": "example",
"reads": 1,
"request_ref": "example",
"revoked_at": "2026-01-15T14:30:00Z",
"revoked_by": "example"
}
}Other responses
401Authentication required403Not permitted404Not Found503Unavailable (nothing was changed)
curl --request GET \
--header "Authorization: Bearer $ID_TOKEN" \
"https://YOUR-CONSOLE-HOST/admin/v1/build-sessions/example-id/documents"Session read
GET /admin/v1/build-sessions/{id}/documents/{doc}
Needs the permission: documents:confidential_build.
Parameters
| Name | In | Type | Presence | Description |
|---|---|---|---|---|
id | path | string | required | - |
doc | path | string | required | - |
Response 200
{}Other responses
401Authentication required403Not permitted404Not Found503Unavailable (nothing was changed)
curl --request GET \
--header "Authorization: Bearer $ID_TOKEN" \
"https://YOUR-CONSOLE-HOST/admin/v1/build-sessions/example-id/documents/example-doc"Conf list
GET /admin/v1/confidential-documents
Needs the permission: documents:confidential.
Response 200
| Field | Type | Presence | Description |
|---|---|---|---|
documents | any | optional | - |
limits | object | optional | - |
limits.max_document_bytes | any | optional | - |
limits.max_per_request | any | optional | - |
limits.max_total_bytes | any | optional | - |
sessions | any | optional | - |
{
"documents": {},
"limits": {
"max_document_bytes": {},
"max_per_request": {},
"max_total_bytes": {}
},
"sessions": {}
}Other responses
401Authentication required403Not permitted404Not Found503Unavailable (nothing was changed)
curl --request GET \
--header "Authorization: Bearer $ID_TOKEN" \
"https://YOUR-CONSOLE-HOST/admin/v1/confidential-documents"Conf upload
POST /admin/v1/confidential-documents
Needs the permission: documents:confidential.
Request body
| Field | Type | Presence | Description |
|---|---|---|---|
confirm_synthetic | boolean | optional | ConfirmSynthetic confirms that values the screen found (dates of birth, record numbers, SSN-shaped numbers, patient segments) are synthetic sample data. |
data | string | optional | base64 |
name | string | optional | - |
no_phi | boolean | optional | NoPHI is the uploader's statement that the document contains no PHI (required). |
request_ref | string | optional | - |
{
"confirm_synthetic": true,
"data": "example",
"name": "example-name",
"no_phi": true,
"request_ref": "example"
}Response 201
| Field | Type | Presence | Description |
|---|---|---|---|
bytes | any | optional | - |
id | any | optional | - |
media_type | any | optional | - |
phi_screen | any | optional | - |
visibility | any | optional | - |
{
"bytes": {},
"id": {},
"media_type": {},
"phi_screen": {},
"visibility": {}
}Other responses
401Authentication required403Not permitted404Not Found422Unprocessable (invalid configuration or input)503Unavailable (nothing was changed)
curl --request POST \
--header "Authorization: Bearer $ID_TOKEN" \
--header "Content-Type: application/json" \
--data '{"confirm_synthetic":true,"data":"example","name":"example-name","no_phi":true,"request_ref":"example"}' \
"https://YOUR-CONSOLE-HOST/admin/v1/confidential-documents"Conf revoke
POST /admin/v1/confidential-documents/build-sessions/{id}/revoke
Needs the permissions: documents:confidential, documents:confidential_build.
Parameters
| Name | In | Type | Presence | Description |
|---|---|---|---|---|
id | path | string | required | - |
Request body
{}Response 200
| Field | Type | Presence | Description |
|---|---|---|---|
status | string | optional | - |
{
"status": "ok"
}Other responses
401Authentication required403Not permitted404Not Found503Unavailable (nothing was changed)
curl --request POST \
--header "Authorization: Bearer $ID_TOKEN" \
--header "Content-Type: application/json" \
--data '{}' \
"https://YOUR-CONSOLE-HOST/admin/v1/confidential-documents/build-sessions/example-id/revoke"Conf delete
DELETE /admin/v1/confidential-documents/{id}
Needs the permission: documents:confidential.
Parameters
| Name | In | Type | Presence | Description |
|---|---|---|---|---|
id | path | string | required | - |
Response 200
| Field | Type | Presence | Description |
|---|---|---|---|
status | string | optional | - |
{
"status": "ok"
}Other responses
401Authentication required403Not permitted404Not Found503Unavailable (nothing was changed)
curl --request DELETE \
--header "Authorization: Bearer $ID_TOKEN" \
"https://YOUR-CONSOLE-HOST/admin/v1/confidential-documents/example-id"Something unclear or missing? Ask Help in the Velacent Bridge console; answers link to the right screen. How support works.