Authorization header.
API key format
Shelfforce API keys use the following format:sf_live_ prefix identifies the key as a production Shelfforce API key.
Key roles
Each API key is assigned a role that determines which endpoints it can access:| Role | Permissions | Use case |
|---|---|---|
read | GET endpoints only | Dashboards, reporting integrations, read-only agents |
write | GET + POST + PATCH endpoints | Image analysis, task creation, field team apps |
admin | Full access including webhook management and key management | Backend services, infrastructure automation |
The
admin role is required to create and manage webhooks. Choose the least-privileged role that meets your needs.Creating API keys
Open API Key settings
Navigate to Settings > API Keys in the Shelfforce dashboard.
Create a new key
Click Create API Key. Provide a descriptive name (e.g., “Production Backend” or “Field App - Read Only”) and select a role.
Using your API key
Include your API key in theAuthorization header of every request:
Authorization header receive a 401 response:
Key rotation
To rotate an API key without downtime:Verify
Confirm that all requests are succeeding with the new key by checking your logs or the API key usage metrics in the dashboard.
Security
Shelfforce takes API key security seriously:- Hashed storage — API keys are hashed with SHA-256 before being stored. The plaintext key is never persisted on our servers.
- Shown once — Keys are displayed only at the moment of creation. There is no way to retrieve a key after navigating away.
- Audit logging — All API key creation, usage, and revocation events are logged and visible in your dashboard.
- Instant revocation — Revoking a key takes effect immediately. All in-flight requests using that key will be rejected.
Best practices
- Use separate keys for each environment (development, staging, production).
- Assign the minimum required role to each key.
- Rotate keys periodically, especially after team member departures.
- Monitor key usage in the dashboard and revoke any keys that show unexpected activity.