Consent API
Available since 1.7.0
A FusionAuth Consent is a definition of a permission that can be given to a User. At a minimum a consent has a name, and defines the minimum age of self-consent. A consent can then be granted to a User from a family member or optionally a User may self-consent if they meet the minimum age defined by the consent.
The first API allows you to create, delete, update and retrieve a consent. The FusionAuth Consent is the object that defines the consent, the values, minimum ages, etc.
The second API is the User Consent API, this API allows you to grant a User Consent, and update a User Consent. In order to revoke a User Consent you simply need to update the consent status.
Use the following APIs to manage Consents:
| Operation | Method | Endpoint |
|---|---|---|
| Create a Consent | POST | /api/consent/api/consent/{consentId} |
| Retrieve a Consent | GET | /api/consent/api/consent/{consentId} |
| Update a Consent | PUT | /api/consent/{consentId} |
| Delete a Consent | DELETE | /api/consent/{consentId} |
| Search for Consents | GETPOST | /api/consent/search?name={name}/api/consent/search |
| Grant a User Consent | POST | /api/user/consent/api/user/consent/{userConsentId} |
| Retrieve a User Consent | GET | /api/user/consent?userId={userId}/api/user/consent/{userConsentId} |
| Update a User Consent | PUT | /api/user/consent/{userConsentId} |
| Revoke a User Consent | DELETE | /api/user/consent/{userConsentId} |