API

PATCH /api/v1/consents/:id

Update a consent record to reflect a status change, expiry update, or new metadata.

Update consent

Use this endpoint to revise an existing consent record when a user changes preferences, a validity window changes, or a record needs to be updated in response to a process change.

PATCH

Request changes

FieldTypeDescription
statusstringThe new lifecycle state such as active, revoked, or expired.
validTostringOptional updated validity date or expiry timestamp.
metadataobjectAdditional operational metadata associated with the record.
curl -X PATCH https://apis.digitalanumati.com/api/v1/consents/c_01J7NM6QX9 \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "revoked",
    "metadata": {
      "reason": "user_withdrew_consent"
    }
  }'

Example response

{
  "consentId": "c_01J7NM6QX9",
  "status": "revoked",
  "updatedAt": "2026-09-28T11:10:00Z",
  "version": 2
}

Operational note

After updating a consent record, confirm the new state in the consent history and review whether downstream systems or workflows need to react to the change.