Consent API
9 endpoints. Paths are relative to https://api.zyton.ai.
- GET
/api/v1/consent/approval-requests
List your approval requests (your org and key environment), newest first.
Parameters for GET /api/v1/consent/approval-requests Parameter Sent in Required subject_refOnly this end user's requests. Query string Optional status`pending` | `approved` | `denied` | `expired` | `cancelled` (a pending request past its deadline counts as `expired`). Query string Optional limit1-200, default 50. Query string Optional offset>= 0, default 0. Query string Optional - POST
/api/v1/consent/approval-requests
Ask one of your end users to approve a consent request on a Zyton-hosted screen.
Takes a JSON request body.
- GET
/api/v1/consent/approval-requests/{request_id}
Read one approval request of your org (and key environment) — poll it for the end
Parameters for GET /api/v1/consent/approval-requests/{request_id} Parameter Sent in Required request_idApproval request id Path Required - POST
/api/v1/consent/approval-requests/{request_id}/cancel
Cancel a pending approval request (it leaves the end user's inbox and can no longer be
Parameters for POST /api/v1/consent/approval-requests/{request_id}/cancel Parameter Sent in Required request_idApproval request id Path Required - GET
/api/v1/consent/grants
List one end user's grants in your org (and key environment), newest first.
Parameters for GET /api/v1/consent/grants Parameter Sent in Required subject_refThe end user whose grants to list (required). Query string Required app_idOnly grants for this app. Query string Optional status`all` (default) or `active` (in force now). Query string Optional limit1-200, default 50. Query string Optional offset>= 0, default 0. Query string Optional - POST
/api/v1/consent/grants
Record a developer-attested consent grant for one of your end users.
Takes a JSON request body.
- GET
/api/v1/consent/grants/{grant_id}
Read one grant of your org (and key environment).
Parameters for GET /api/v1/consent/grants/{grant_id} Parameter Sent in Required grant_idGrant id Path Required - POST
/api/v1/consent/grants/{grant_id}/revoke
Revoke a grant (the end user withdrew consent). Idempotent.
Parameters for POST /api/v1/consent/grants/{grant_id}/revoke Parameter Sent in Required grant_idGrant id Path Required - POST
/api/v1/consent/grants/check
Check consent before acting on an end user's data.
Takes a JSON request body.