SuperdindaDocs
Consents

Decline the consent request (public)

POST
/consent-requests/{token}/decline

Closes the pending request as declined. The guardian is told that it happened and when (event consent.declined, notification consent.declined) — never which choice was made. A new link cannot be sent for CONSENT_RESEND_COOLDOWN_HOURS (default 24). Idempotent: declining again answers the first decline. Limits: RATE_CONSENT_WRITE_PER_LINK (default 10 per hour) and RATE_CONSENT_WRITE_PER_IP (default 30 per hour).

Path Parameters

token*string

the opaque token from the link

Length16 <= length <= 4096

Request Body

application/json
  1. body
choice*string

which answer the dependent picked — kept server-side, never shown to the guardian

Value in"not_now""talk_first"

Response Body

Declined

application/json
  1. response
success*true
Value intrue
data*
Example Request
curl -X POST 'http://localhost:3000/consent-requests/stringstringstri/decline' \  -H 'Content-Type: application/json' \  -d '{  "choice": "not_now"}'
Example Response
{  "success": true,  "data": {    "status": "declined",    "at": "2019-08-24T14:15:22Z"  }}