Skip to main content
Authorisation management allows you to track and verify user authorisation for data sharing. Teal provides default authorisation terms, or you can create custom terms tailored to your business requirements.

Authorisation Terms

Authorisation terms define the legal text that users agree to when granting access to their data.

System Terms vs Custom Terms

Categories

Each term belongs to a category that defines the type of authorisation:
  • one_time - Single authorisation for a specific action (e.g., one-time income verification). One-time authorisations expire after 1 day, after which the user must re-authorise.
  • recurring - Ongoing authorisation for continuous data access (e.g., recurring payroll checks)

Retrieving Available Terms

Filter by type using query parameters:

Creating Custom Terms

If system terms don’t meet your requirements, create custom terms:
The authorisation_version is automatically assigned and incremented for each new term you create.

Managing Active Terms

By default, creating a new term keeps any existing active terms in the same category active. Use the optional deactivate_previous flag to control this behavior:
When you deactivate previous terms, users who accepted the old term will need to re-authorise to the new term (see Re-authorisation Flow).

Getting the Latest Term for a User

To get the appropriate authorisation term for a user based on their recurring check configuration:
This endpoint automatically resolves to either the one_time or recurring category based on the user’s configuration.

Recording Authorisation

When a user accepts authorisation terms, record their acceptance:
term_id is optional. If it is absent in the request, then the latest active term is searched against the user’s current setting. For example, if they have reucrring checks enabled then it will resolve to the latest active term matching this category. If the term_id is supplied you can choose which term the user is accepting, provided it is active. No category matching is done currently for an explcitly provided term.

Optional Fields

Authorisation Record

Each acceptance creates an immutable record containing:
  • id - Unique authorisation record identifier
  • user_id - The user who gave authorisation
  • term_id - The specific term version accepted
  • ip_address - Captured from request headers or provided in request
  • user_agent - Browser or application identifier
  • accepted_at - Server timestamp of acceptance
  • expires_at - Expiry timestamp for the authorisation. Present for one-time authorisations.
  • status - active, revoked, or expired

Validating Authorisation

Before performing actions that require authorisation, verify the user has accepted the current active terms.

Check User’s Authorisation Status

Validation Logic

Each authorisation record includes an is_valid field that indicates whether the authorisation is currently valid:
  • is_valid: true - Authorisation status is active AND the associated term is active AND the authorisation has not expired
  • is_valid: false - Either authorisation is revoked, the term has been deactivated, or the authorisation has expired
If is_valid is false because the term was deactivated, the user needs to re-authorise to the new term.
One-time authorisations automatically expire. Once expired, the user must re-authorise before any further actions can be performed. Check the expires_at field on the authorisation record to see when it expires.

Re-authorisation Flow

When you update your terms, you can deactivate the old term using deactivate_previous: true (see Managing Active Terms). Users who accepted the deactivated term will need to re-authorise.

Flow

Example: Detecting Outdated Authorisation

Revoking Authorisation

Users can revoke their authorisation at any time. Revocation preserves the record for audit purposes.
After revocation:
  • The authorisation record’s status changes to revoked
  • The revoked_at timestamp is set
  • The record is preserved for compliance and audit purposes