Skip to main content
POST
/
v1
/
consents
Record consent
curl --request POST \
  --url https://lodger.dev/v1/consents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "workspaceId": "<string>",
  "subject": {
    "id": "<string>",
    "email": "<string>"
  },
  "policyVersion": 123,
  "surface": "<string>",
  "projectId": "<string>",
  "metadata": {}
}
'
{
  "receipt": {
    "accepted": true,
    "eventId": "<string>",
    "receipt": "<string>",
    "eventHash": "<string>",
    "previousHash": "<string>",
    "timestamp": "2023-11-07T05:31:56Z",
    "actor": {
      "id": "<string>",
      "email": "<string>"
    },
    "target": {
      "id": "<string>",
      "type": "<string>",
      "name": "<string>"
    },
    "verificationUrl": "<string>",
    "queued": true,
    "receivedAt": "2023-11-07T05:31:56Z",
    "provenance": {},
    "policyVersion": 123
  }
}

Authorizations

Authorization
string
header
default:lodger_sk_your_key
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string
required
Minimum string length: 12

Body

application/json
workspaceId
string
required
subject
object
required
mode
enum<string>
required
Available options:
explicit,
implicit
policyVersion
integer
required
surface
string
required
projectId
string
metadata
object

Response

Consent event accepted.

receipt
object
required