Use API Key in Requests

To authenticate with the Tezzela API, you must include your API key in the X-API-KEY header of each request.

This key is unique and is required for all interactions with the API, including creating dashboards, updating widgets, and sending notifications.

Using the API key

Include it in the X-API-KEY header of your HTTP requests:

X-API-KEY: <YOUR_API_TOKEN>

For example, a request to create a dashboard might look like this:

curl --location 'https://tezzela.com/api/v1/dashboards/static' \
--header 'Content-Type: application/json' \
--header 'api-key: <YOUR_API_TOKEN>' \
--data-raw '{
    "data": {
        "title": "Example Dashboard",
        "id": "example-dashboard",
        "to": "[email protected]",
        "widgets": []
    }
}'

About the id and to fields

In Tezzela, each dashboard is uniquely identified by the combination of the id and to fields.

  • id is a required string that acts as the dashboard’s internal identifier. It should be consistent across updates if you want to refer to the same dashboard over time.

  • to is the recipient’s email address. This is the user who will be able to view the dashboard in the app.

Together, id + to define the unique scope of a dashboard. This means you can reuse the same id for different recipients, and each one will receive an independent version of the dashboard.

Why are id and to important?

Tezzela uses the id and to combination to determine whether to:

  • Create a new dashboard if no matching dashboard exists.

  • Update an existing dashboard if one already exists with the same id and to.

This mechanism allows you to dynamically manage dashboards for multiple users, while keeping control over versioning and updates with simple, predictable identifiers.

You are free to use any string as the id, from readable slugs like "monthly-report" to UUIDs or timestamp-based values. The key is to keep the value unique within the context of the same recipient.

Note: If this feels a bit complex at first, don’t worry. The concept will become clearer as you explore the rest of the documentation and begin using the API. In most cases, you’ll just need to pick a meaningful id for your dashboard and specify the email of the recipient (to). Tezzela handles the rest—creating or updating dashboards automatically based on that combination.

Last updated