Append a consent record, or a revocation of one
POST
/v1/consents
const url = 'https://api.vocapable.com/v1/consents';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"contact_id":"example","consent_class":"pewc","source":"web_form","captured_at":"2026-04-15T12:00:00Z","scope":{},"proof":{},"disclosure_text_shown":"example","expires_at":"2026-04-15T12:00:00Z","revokes_consent_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.vocapable.com/v1/consents \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "contact_id": "example", "consent_class": "pewc", "source": "web_form", "captured_at": "2026-04-15T12:00:00Z", "scope": {}, "proof": {}, "disclosure_text_shown": "example", "expires_at": "2026-04-15T12:00:00Z", "revokes_consent_id": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
ConsentCreateRequest
Append a consent record, or - with revokes_consent_id - a revocation of one.
object
contact_id
required
Contact Id
string
consent_class
required
ConsentBasis
CANON fact 18 - the four consent classes (docs/07-compliance.md §consent).
string
source
required
Source
string
captured_at
required
Captured At
string format: date-time
scope
Scope
object
key
additional properties
any
proof
Proof
object
key
additional properties
any
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
ConsentRecordSummary
object
id
required
Id
string
contact_id
required
Contact Id
string
consent_class
required
ConsentBasis
CANON fact 18 - the four consent classes (docs/07-compliance.md §consent).
string
scope
Scope
object
key
additional properties
any
source
required
Source
string
proof
Proof
object
key
additional properties
any
captured_at
required
Captured At
string format: date-time
status
required
Status
string
created_at
required
Created At
string format: date-time
Example
{ "consent_class": "pewc", "source": "web_form", "status": "active"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}