API keys
Create Platform API keys for your servers, choose what each may read, and revoke them.
API keys let your own servers and scripts call the Platform API, for example to read usage into your own dashboards or check a segment's limits. They are read-only for now.
API keys are for the Platform API only. Apps connect to the Realtime API with tokens, never with an API key.
Create one
- Open API keys and choose New API key. Owners and admins manage keys.
- Give it a name, e.g. "Analytics backend", and an optional description.
- Under Access, add what it may read: the whole workspace, or one segment. Add several entries to reach several segments.
- Optionally set an expiry date.
- Choose Create, then copy the key. It is shown once; afterwards only its prefix is visible.
Store it in your server's secrets and send it as the X-API-Key header:
curl https://api.folkways.io/api/v1/organizations/$WORKSPACE_ID/usage \
-H "X-API-Key: $FOLKWAYS_API_KEY"What a key can reach
A key belongs to one workspace and reaches only the workspace or segments in its access list:
| Access | Lets the key read |
|---|---|
| Workspace | The workspace, its segment list, its subscription and its usage |
| Segment | That segment and its usage |
A key never has more than read access, whatever the access level says, and can't call anything that needs a signed-in owner or admin. See Platform API authentication.
Edit, revoke, delete
- Edit changes a key's name and description; its access and secret stay the same.
- Revoke stops it at once, for good.
- Delete removes it from the list.
Create one key per server or script, so you can revoke one without touching the others.