How to create and manage API keys
Create a key so another tool can act on your organization, pick its access level, store the secret safely, and revoke it when you are done.
This is done in the organizer dashboard
An API key is how you let a tool — a script of yours, a spreadsheet, your production company's system — act inside your organization without anybody typing an email and a password. The key carries exactly the access you granted it: a read-only key can list your events, but it cannot publish, refund or invite anyone.
Think of it as a visitor badge you issue yourself: it lasts as long as you want, it opens only the doors you ticked, and you can cancel it at any moment.
Where the keys live
In the sidebar, under Settings, click API keys. The page opens with the subtitle "Connect other tools to your Baila account." and the list of existing keys, with the columns Name, Key prefix, Created, Last used, Expiry, Status and Actions.
Only people allowed to create and revoke keys see this item in the sidebar. If it is not there for you, ask whoever runs the organization.
Step by step
On API keys, click New key.
Fill in the Key name with something that explains what it is for — "Claude integration", "Sales spreadsheet", "Website script". That name is what will let you decide, six months from now, which key is safe to revoke.
Pick the access level from the role cards. The Read-only card ("Sees everything, changes nothing.") comes preselected — start there and only go higher if the tool genuinely needs to change something. For a different slice, use Need something different? Customize and save it as a new role.
Under Expiry (optional), pick a date if the key is temporary. "Leave blank for a key with no expiry."
Click Create key.
The secret is shown exactly once
As soon as the key is created, the window turns into Your key is ready and shows the warning "Copy it now: for safety, it is never shown again." and the whole key, shaped like baila_live_xxxxxxxx_....
Click Copy key — the button turns into Copied.
Paste the key wherever it will be used (your team's password manager, the tool's secret store, your script's configuration). Never into a chat group or an email.
Click Done to close the window. If you try to close it any other way, the dashboard asks first (Back to the key or Close anyway).
Baila does not store the key, only a fingerprint of it — which is why it can never be shown again, not even by support. If you close that screen without copying, the only way forward is to revoke the key and create another. What stays visible in the list is just the Key prefix, which identifies the key and opens nothing on its own.
Using the key
The key goes in the Authorization header as a bearer token. For example, to list your organization's events:
curl -H "Authorization: Bearer baila_live_xxxxxxxx_YOUR_KEY_HERE" \
https://api.vaidebaila.app/api/eventsIf the key is wrong, expired or revoked, the answer is always the same authentication error, without saying which of the three it was. That is deliberate: spelling out the reason would only help somebody guessing at a key.
The Last used column shows the last time a request arrived with that key. It is the quickest way to find the keys nobody needs any more.
A key can never touch the team or other keys: requests to invite people, change roles or create keys are refused even for a key with broad access. If a key could mint more keys, revoking one would mean nothing.
What about connecting Claude or another assistant?
You don't need a key. Claude and other AI assistants connect through https://mcp.vaidebaila.app/mcp: you sign in with your Baila account, choose what the assistant may do and keep track of it under Connected assistants. The step-by-step is in How to connect Claude and other AI assistants to Baila.
A key still works for developer tools that speak MCP, such as Claude Code: they can use the same address with the key in the Authorization: Bearer ... header. In that case, the key's access and rules apply.
What changed for key integrations (2026-11-29)
From 2026-11-29, some API responses come back with fewer fields when the request comes from an API key or a connected assistant. People in the dashboard keep seeing everything as before. If your script read any of these fields, update it:
| Where | What no longer comes back |
|---|---|
| Event terms acceptances (list and CSV export) | The buyer's ID document (even masked), the IP address and forwarded chain, the browser, the device id, the app version, the device language and timezone, the screen size and the location. In the export, the IP address and device id columns stay, empty. The term, its version, when it was accepted and the name and e-mail of who accepted it remain. |
| An event's orders | Only the sale's fields (buyer, status, amounts, lots, tickets and attribution). The payer's document, the gateway references and Pix payload, the split amounts and the gift data are left out. |
| Fan club invoices | The gateway code and the charge and installment references. From the charge attempts, only the status and the error code remain. |
| Ticket transfers | The e-mail of the person who received the ticket. |
| Orders with products | The full delivery address: only city, state and country come back. The selling organization and the split amounts are left out too. |
| Event detail | From the organization, only id, name and slug. |
| Partner program referrals | The review note and who reviewed it. |
| Event cancellation | The raw error of the last attempt comes back as a code. |
The data stays in the dashboard for whoever has permission, and exports made from the dashboard did not change.
Revoking a key
In the list, every key with the Active status has a Revoke button beside it. Click it and confirm the question "Revoke the key ...? Anything using it loses access immediately."
The key then shows the Revoked status and stays in the list — it does not disappear, it just folds away with the other inactive keys behind Show N inactive keys at the end of the list. Keeping the row is what lets you answer, later, "which key did this, and when did it stop working?". Keys past their expiry date show up as Expired and stop working on their own.
Treat a key the way you treat a password: do not share it, do not commit it to a public repository, and revoke it the moment you suspect it leaked. And always grant the smallest access that does the job — when in doubt, Read-only.
Related articles
How to issue NFS-e invoices automatically with Asaas
Turn on automatic NFS-e issuing under Integrations › Asaas › Invoices. For every paid ticket order or fan-club charge, Asaas issues the invoice on behalf of your company and sends it to the buyer.
How to connect Claude and other AI assistants to Baila
Add Baila as a connector in your assistant, choose in Baila what it may do, and ask in plain words for numbers, draft events, coupons and even a seat map drawn from a photo.