Disclosure Requests
Cancel Disclosure Request
Withdraw an open disclosure request before the holder answers
POST
/
customers
/
api
/
disclosure-requests
/
{id}
/
cancel
curl -X POST "https://api.trusset.org/customers/api/disclosure-requests/cmg7q3v2k0004lq08h2z9x6de/cancel" \
-H "X-API-Key: trusset_your_key_here"
const response = await fetch(
'https://api.trusset.org/customers/api/disclosure-requests/cmg7q3v2k0004lq08h2z9x6de/cancel',
{
method: 'POST',
headers: { 'X-API-Key': 'trusset_your_key_here' }
}
);
const { success, data, error } = await response.json();
{
"success": true,
"data": {
"id": "cmg7q3v2k0004lq08h2z9x6de",
"walletAddress": "0x801D3b83882B1047fb2CeB6C097C3ae806D8D028",
"scope": "COUNTRY",
"scopeLabel": "Reveal country",
"referenceUrl": "https://acme-capital.example/onboarding/4711",
"message": "Please confirm your country of residence for your account opening",
"status": "CANCELLED",
"environment": "DEV",
"createdAt": "2026-09-30T09:30:00.000Z",
"expiresAt": "2026-10-14T09:30:00.000Z",
"respondedAt": null,
"proofLevel": null
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-10-01T09:00:00.000Z"
}
}
{
"success": false,
"error": {
"code": "REQUEST_CLOSED",
"message": "This request is already approved"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-10-01T15:00:00.000Z"
}
}
Withdraws an open disclosure request. The holder can no longer answer it, and it leaves their list of open requests on verify.trusset.org.
Only an
OPEN request can be cancelled. An approved request stays approved, and its consent and disclosure stay readable through Get Disclosure Request.
The check looks at the status, not at the expiry. A request past expiresAt that no read has marked EXPIRED yet is cancelled rather than refused.
Path Parameters
string
required
The request
id. Letters and digits only, at most 100 characters.Response Fields
object
The request with
status set to CANCELLED, in the shape Create Disclosure Request returns. respondedAt is still null in this response. A later read shows the cancellation time.curl -X POST "https://api.trusset.org/customers/api/disclosure-requests/cmg7q3v2k0004lq08h2z9x6de/cancel" \
-H "X-API-Key: trusset_your_key_here"
const response = await fetch(
'https://api.trusset.org/customers/api/disclosure-requests/cmg7q3v2k0004lq08h2z9x6de/cancel',
{
method: 'POST',
headers: { 'X-API-Key': 'trusset_your_key_here' }
}
);
const { success, data, error } = await response.json();
{
"success": true,
"data": {
"id": "cmg7q3v2k0004lq08h2z9x6de",
"walletAddress": "0x801D3b83882B1047fb2CeB6C097C3ae806D8D028",
"scope": "COUNTRY",
"scopeLabel": "Reveal country",
"referenceUrl": "https://acme-capital.example/onboarding/4711",
"message": "Please confirm your country of residence for your account opening",
"status": "CANCELLED",
"environment": "DEV",
"createdAt": "2026-09-30T09:30:00.000Z",
"expiresAt": "2026-10-14T09:30:00.000Z",
"respondedAt": null,
"proofLevel": null
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-10-01T09:00:00.000Z"
}
}
{
"success": false,
"error": {
"code": "REQUEST_CLOSED",
"message": "This request is already approved"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-10-01T15:00:00.000Z"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
VALIDATION_ERROR | 400 | id contains characters other than letters and digits, or is longer than 100 characters |
NOT_FOUND | 404 | No request with this ID was made by your instance |
REQUEST_CLOSED | 409 | The request is not OPEN, or the holder answered it while the cancellation was being written |
CANCEL_DISCLOSURE_REQUEST_FAILED | 500 | The request could not be cancelled |
⌘I
curl -X POST "https://api.trusset.org/customers/api/disclosure-requests/cmg7q3v2k0004lq08h2z9x6de/cancel" \
-H "X-API-Key: trusset_your_key_here"
const response = await fetch(
'https://api.trusset.org/customers/api/disclosure-requests/cmg7q3v2k0004lq08h2z9x6de/cancel',
{
method: 'POST',
headers: { 'X-API-Key': 'trusset_your_key_here' }
}
);
const { success, data, error } = await response.json();
{
"success": true,
"data": {
"id": "cmg7q3v2k0004lq08h2z9x6de",
"walletAddress": "0x801D3b83882B1047fb2CeB6C097C3ae806D8D028",
"scope": "COUNTRY",
"scopeLabel": "Reveal country",
"referenceUrl": "https://acme-capital.example/onboarding/4711",
"message": "Please confirm your country of residence for your account opening",
"status": "CANCELLED",
"environment": "DEV",
"createdAt": "2026-09-30T09:30:00.000Z",
"expiresAt": "2026-10-14T09:30:00.000Z",
"respondedAt": null,
"proofLevel": null
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-10-01T09:00:00.000Z"
}
}
{
"success": false,
"error": {
"code": "REQUEST_CLOSED",
"message": "This request is already approved"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-10-01T15:00:00.000Z"
}
}
