Skip to main content
POST
/
v1
/
consent
/
phone
/
{phone}
/
{brief}
Create consent by phone
curl --request POST \
  --url http://localhost:3000/v1/consent/phone/{phone}/{brief} \
  --header 'Content-Type: application/json' \
  --header 'X-Bunker-Token: <api-key>' \
  --data '
{
  "status": "accept",
  "message": "<string>",
  "who": "<string>",
  "starttime": "<string>",
  "endtime": "<string>",
  "lawfulbasis": "consent",
  "module": "api",
  "referencecode": "<string>",
  "lastmodifiedby": "<string>"
}
'
{
  "status": "ok"
}

Authorizations

X-Bunker-Token
string
header
required

Root access token for Databunker API

Path Parameters

phone
string
required

User phone number

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"