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:

OperationMethodEndpoint
Create a ConsentPOST/api/consent
/api/consent/{consentId}
Retrieve a ConsentGET/api/consent
/api/consent/{consentId}
Update a ConsentPUT/api/consent/{consentId}
Delete a ConsentDELETE/api/consent/{consentId}
Search for ConsentsGET
POST
/api/consent/search?name={name}
/api/consent/search
Grant a User ConsentPOST/api/user/consent
/api/user/consent/{userConsentId}
Retrieve a User ConsentGET/api/user/consent?userId={userId}
/api/user/consent/{userConsentId}
Update a User ConsentPUT/api/user/consent/{userConsentId}
Revoke a User ConsentDELETE/api/user/consent/{userConsentId}