API keys
An API key lets something that is not a person, such as a GitHub Actions pipeline, use Belay’s API: start batches and runs, read their results, and, with a key made for it, save workflows from their files. To run your workflows from a pipeline, see Run from CI. A key belongs to the organization, not to the person who made it, so it keeps working when that person leaves.
What a key can do
Section titled “What a key can do”You choose what a key can do when you make it, and it stays that way. There are two kinds:
| Kind | Shown as | Can |
|---|---|---|
| Run workflows and read results | Run and read | Read the organization’s projects, environments, workflows, tags, batches, runs, and each step’s evidence and screenshots; start and cancel runs and batches, and run a batch’s interrupted runs again; and check workflows’ files without saving them. For a pipeline that tests a pull request. |
| Run workflows and update them from files | Run, read, and update | Everything the first kind can, and save workflows from their files, so the saved workflows follow what you release. For the pipeline that releases. |
A key that runs and reads is refused a save of files, with:
This key can’t update workflows. Make one that can on Organization, API keys.
No key can change a project or a setting, delete a workflow, or open a live page. A key works only with the API. It does not sign anyone in to Belay, and an agent can’t use one to connect over MCP.
To give a pipeline more, make a new key of the kind it needs, put it in the pipeline, then revoke the old one.
Make a key
Section titled “Make a key”API keys are in the organization’s settings, under API keys.
- Enter a name for the key. Name it for what uses it, such as the pipeline or the repository, so you know which one to revoke later.
- Choose what it can do: Run workflows and read results, which is chosen to begin with, or Run workflows and update them from files.
- Choose New key.
Belay shows the key once, right after you make it, with a Copy button. Copy it then and keep it as a secret in your pipeline, such as a repository secret named BELAY_API_KEY. Belay keeps only enough to recognise the key and its last four characters, so it can’t show the key again. If it is lost, make another and revoke the lost one.
A key starts with belay_. Send it as Authorization: Bearer belay_…; the API page says how.
The list of keys
Section titled “The list of keys”| Column | What it shows |
|---|---|
| Name | The key’s name. Batches and runs it starts, and workflows it saves, show this name with “(API)”. |
| Access | What it can do: Run and read, or Run, read, and update in a stronger type. On a phone this stays beside the name. |
| Key | The last four characters it ends in, to tell keys apart. Not shown on a phone. |
| Created | When it was made, and by whom. Not shown on a phone. |
| Last used | When it was last used, or Never. Belay notes a key’s use at most once a minute. |
Revoke a key
Section titled “Revoke a key”Choose Revoke… on the key’s row, then Revoke key. It stops working at once, so a pipeline using it can’t start or read anything. The batches and runs it started stay, and keep its name.
Revoking can’t be undone. To change a pipeline’s key, make the new one first, put it in the pipeline, then revoke the old one.
Limits
Section titled “Limits”- An organization has at most 20 keys that are not revoked.
- Two keys that are not revoked can’t share a name, ignoring case.
- A key may make up to 300 requests a minute. More are refused until the minute is up.
- Runs a key starts count against your plan as any run does. See Plan and usage.
Who can manage keys
Section titled “Who can manage keys”Admins make and revoke keys. Members and Viewers don’t see the page. See Members and roles.