Skip to main content
POST
/
v1
/
consent
/
token
/
{token}
/
{brief}
Create consent by user token
curl --request POST \
  --url http://localhost:3000/v1/consent/token/{token}/{brief} \
  --header 'Content-Type: application/json' \
  --header 'X-Bunker-Token: <api-key>' \
  --data '
{
  "message": "Optional long text here"
}
'
{
  "status": "ok"
}

Authorizations

X-Bunker-Token
string
header
required

Root access token for Databunker API

Path Parameters

token
string<uuid>
required

User token (UUID)

brief
string
required

Consent brief (unique identifier, max 64 chars)

Maximum string length: 64

Body

status
enum<string>
default:accept

Consent status

Available options:
accept,
cancel
message
string

Text message describing consent

who
string

Free text for internal usage

starttime
string

Date & time to automatically enable consent (Unix time or duration like '10d')

endtime
string

Consent expiration date (Unix time or duration like '1m')

lawfulbasis
enum<string>
default:consent

Legal basis for processing

Available options:
consent,
contract-agreement,
legal-obligations
module
string
default:api

Module type (e.g., phone-consent, contract, app-consent, web-consent, email-consent)

referencecode
string

Internal document or contract ID

lastmodifiedby
string

Name of person who last modified this record

Response

Consent created successfully

status
enum<string>
required
Available options:
ok
Example:

"ok"