Skip to main content
Flare’s API is available at https://api.flare.io. Requests are authenticated with API tokens which can be obtained using an API key.

Authentication Objects and Purpose

API Key

Used to generate API tokens. Can be given an expiration date.

API Token

Used to access API endpoints. Expires after 1 hour.

Authentication Steps

Obtain an API Key

From the profile page.

Generate a temporary API Token

Using the API key.

Access API endpoints

Using the API token.

1 - Obtaining an API key

Users can generate API keys from the Profile page, in the API keys section, by clicking Generate key. When creating a key, you choose:
  • Name: a description that helps you recognize the key.
  • Permissions:
    • Default: the key inherits your current role permissions. If you can access a tenant, the key can access that tenant. If you are an organization administrator, the key has organization administrator access. If your role changes, the key’s access changes with it.
    • Restricted: the key only has the permissions you select. You can only select permissions that your role allows.
  • Expiration date (optional): the key stops working at 00:00 (your local time) on that date. Setting an expiration date is recommended. Without one, the key never expires.
Each endpoint in the API reference lists the API key permission it requires.
The key’s secret is only shown once, when the key is created. Save it somewhere secure, such as a password manager or secret store.

2 - Obtaining an API Token

API tokens are obtained using Flare API keys. They can be generated using the tokens/generate endpoint.

3 - Access an API endpoint

API tokens may then be used by specifying the Authorization: Bearer <api-token> header. API tokens can be tested using the tokens/test endpoint.

Finding tenant IDs

Users can find the IDs of the tenants they have access to by visiting the Profile page under the “Tenants” section.

Sidebar -> Configure -> Profile -> Tenants

End-to-End Examples

These are end-to-end examples in various programming languages.
Python SDK