Skip to content

Consent routes: update

The Consent Verbs update as api.sb routes, with inputs, result, refusals and an example.

Reference for Consent, one group of Consent routes.

Consent.update

Changes the given properties of a Consent. Verb page.

Text
PATCH /{namespace}/consents/{id}

Path: id. Body, as JSON: the other inputs. Emits Consent.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Consent.
basisstringThe lawful basis, such as consent or contract. Never randomized.
regionstringThe jurisdiction whose rules apply. Never randomized.
withdrawnAtdatetimeWhen the person withdrew it. Never randomized.

Returns

OutputTypeRequiredDescription
consentConsentrequiredThe Consent.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X PATCH https://api.sb/leaseline.app/consents/consent_lMkrg7nUGY \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"withdrawnAt":"2026-10-22T12:00:00Z"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "consent": {
    "$id": "https://api.sb/leaseline.app/consents/consent_lMkrg7nUGY",
    "$type": "Consent",
    "basis": "Example basis",
    "withdrawnAt": "2026-10-22T12:00:00Z"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Consent.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}