User Consent

Record a consent

Submit a consent decision for a consent type, such as authorizing automatic top-ups.

post/auth/user-consent

Request

  • Base URL: https://infrahub-api.nexgencloud.com/v1
  • URL: https://infrahub-api.nexgencloud.com/v1/auth/user-consent
  • Auth: API key in header api_key

Request body

consent_type'auto_top_up' required

The category of consent to record a decision for, such as auto_top_up.

action'granted' | 'revoked' required

The consent decision to record, either granted or revoked.

consent_method'web_checkbox' | 'api' | 'admin_override'

How the consent decision is being captured, such as api.

consent_versionstring

Version identifier. Defaults to the current version for the consent type

metadataobject

Consent-type-specific metadata. For auto_top_up, this is required and must include threshold_amount, topup_amount, and payment_method_ref.

Example request

{
  "consent_type": "auto_top_up",
  "action": "granted",
  "consent_method": "web_checkbox"
}

Response

Example response.

messagestring

Human-readable message describing the result of the request.

Changes

No recorded changes to this operation across all 1 revision of this API.