ONIOKODeveloper
Consent

Record an explicitly granted subject consent.

In preparationNot released yet

This operation exists in the platform layer and is verified in CI, but it is not live for partners. The contract can still change before release. Do not build against it yet.

POST
/v1/subjects/{subject_id}/consents

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

subject_id*Subject Id
Formatuuid

Header Parameters

Idempotency-Key*Idempotency-Key
Match^[A-Za-z0-9._~-]+$
Length16 <= length <= 128

Request Body

application/json
  1. body
purpose*Purpose
Length1 <= length <= 200
consent_version*Consent Version
Length1 <= length <= 100
granted*Granted

Partner confirms that the subject granted this specific consent.

Response Body

Successful response

application/json
  1. response
subject_id*Subject Id
Formatuuid
consent_id*Consent Id
Formatuuid
purpose*Purpose
consent_version*Consent Version
Example Request
curl -X POST 'https://example.com/v1/subjects/497f6eca-6276-4993-bfeb-53cbbbba6f08/consents' \  -H 'Idempotency-Key: stringstringstri' \  -H 'Content-Type: application/json' \  -d '{  "purpose": "string",  "consent_version": "string",  "granted": true}'
Example Response
{  "subject_id": "80e197be-61ad-4068-b4ff-a483fb5c18f9",  "consent_id": "b6c6f30d-b96b-4de6-8a03-238cde9dddba",  "purpose": "string",  "consent_version": "string"}