Skip to content

Append a consent record, or a revocation of one

POST
/v1/consents
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" }'
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
Allowed values: pewc pec ebr transactional
source
required
Source
string
Allowed values: web_form ivr recorded_call paper import_attestation
captured_at
required
Captured At
string format: date-time
scope
Scope
object
key
additional properties
any
proof
Proof
object
key
additional properties
any
disclosure_text_shown
Any of:
string
expires_at
Any of:
string format: date-time
revokes_consent_id
Any of:
string

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
Allowed values: pewc pec ebr transactional
scope
Scope
object
key
additional properties
any
source
required
Source
string
Allowed values: web_form ivr recorded_call paper import_attestation api_attestation
proof
Proof
object
key
additional properties
any
disclosure_text_shown
Any of:
string
captured_at
required
Captured At
string format: date-time
expires_at
Any of:
string format: date-time
status
required
Status
string
Allowed values: active expired revoked suspect
revokes_consent_id
Any of:
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>
ValidationError
object
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": {}
}
]
}