Herald
OpenapiLegal

Record the user's explicit consent to one or more agreement versions.

Self-service — requires `inject_identity`. Each `version_id` must equal the current effective version for its type (enforced in the service layer, BE-D04); a stale version surfaces as 409 so the client re-reads the effective version. Returns 204 on success. The upsert is idempotent on a repeat of the same version.

POST
/api/legal/{realmId}/consent

Self-service — requires inject_identity. Each version_id must equal the current effective version for its type (enforced in the service layer, BE-D04); a stale version surfaces as 409 so the client re-reads the effective version. Returns 204 on success. The upsert is idempotent on a repeat of the same version.

Path Parameters

realmId*string

Realm ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

agreements*array<>

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/legal/string/consent" \  -H "Content-Type: application/json" \  -d '{    "agreements": [      {        "agreement_type": "string",        "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c"      }    ]  }'
Empty
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}