Consent again to a client card's terms
const url = 'http://localhost:8000/api/portal/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/consent/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"consent_version":"2026-10-29-draft","confirm_adult":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8000/api/portal/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/consent/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "consent_version": "2026-10-29-draft", "confirm_adult": true }'After the consent texts change, the portal asks again (403 consent_required); this records the new consent for the signed-in account’s access to the card. 201 for a new record, 200 when this version was already given. 404 unless the account holds active access to the card; 403 access_ended (reason: team_plan · minor) when that access no longer opens the card, as the portal answers; 409 consent_outdated for any version but the current one; 400 unless confirm_adult is true; 429 past the account’s rate (client_portal, 120/min). Answers 404 while client access is switched off on the environment.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”POST /api/portal/<client_id>/consent/ body.
object
The person confirms they are 18 or over (or the age of majority where they live). Must be true.
Examples
The current version
{ "consent_version": "2026-10-29-draft", "confirm_adult": true}POST /api/portal/<client_id>/consent/ body.
object
The person confirms they are 18 or over (or the age of majority where they live). Must be true.
Example generated
confirm_adult=true&consent_version=examplePOST /api/portal/<client_id>/consent/ body.
object
The person confirms they are 18 or over (or the age of majority where they live). Must be true.
Responses
Section titled “Responses”object
Examples
{ "consent_version": "2026-10-29-draft", "kinds": [ "terms", "privacy", "processing", "guardian_declaration" ], "accepted_at": "2026-11-02T18:20:00Z"}object
Examples
{ "consent_version": "2026-10-29-draft", "kinds": [ "terms", "privacy", "processing", "guardian_declaration" ], "accepted_at": "2026-11-02T18:20:00Z"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Example generated
{ "detail": "example"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Example generated
{ "detail": "example"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Example generated
{ "detail": "example"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examples
404 — no access to this card
{ "detail": "access_not_found"}object
409 — the request conflicts with current state. detail is a stable code (e.g. reanalyze_in_flight, already_on_plan, email_in_use). Some 409s carry extra context fields alongside detail; those are documented on the specific endpoint that emits them.
Examples
409 — old consent
{ "detail": "consent_outdated"}object
429 — throttled: this account’s (or address’s) rate for the route is used up; try again after wait seconds, which Retry-After repeats. A route with a limit of its own answers its own code instead, documented there.
With throttled: whole seconds until the next request can pass.
Example generated
{ "detail": "example", "wait": 1}