Generating an API Key
API keys are created in the Shilo web app. You must be an owner or admin to generate them.- Open Settings in the Shilo app.
- Navigate to API Keys.
- Click Create API Key, give it a descriptive name, and choose its permission level.
- Copy the key immediately—it will not be shown again.
Sending Your API Key
You can authenticate using either of two header formats. Both are accepted on every endpoint.Option 1 — x-api-key header (recommended)
Option 2 — Authorization: Bearer header
Read-Only vs. Read-Write Keys
Shilo issues two permission tiers:
A read-only key attempting a write operation receives a
403 Forbidden response. This lets you safely hand a key to a reporting dashboard or analytics pipeline without risking accidental data changes.
Error Responses
A
401 response typically means the key was not included in the header, was mistyped, or has been revoked. Double-check both the header name and the key value.
Complete Authentication Example
The following request lists your organization’s users using thex-api-key header:
Authorization header:
Keep your API keys secret. Never embed them in client-side JavaScript, mobile app binaries, or public repositories. Store keys in environment variables or a secrets manager, and rotate them regularly to limit exposure if a key is compromised.
Security Best Practices
- Use separate keys per integration. Isolate credentials so you can revoke a single key without disrupting other systems.
- Prefer read-only keys for any integration that only needs to read data.
- Rotate keys periodically. Generate a replacement key, update your integration, then delete the old key.
- Audit key usage. Check the Shilo Settings page regularly for keys that are no longer in use and revoke them.