Authentication
Authenticate with the Sentrasa API using your API key.
API Key Authentication
All API requests require an API key passed in the X-API-Key header. Create one from the dashboard under Settings > API Keys.
bash
curl https://api.sentrasa.com/api/v1/workspaces/{workspace_id}/posts \
-H "X-API-Key: rp_your_api_key"API keys are prefixed with rp_ and are scoped to a specific workspace. The full key value is only shown once when created — store it securely.
Creating an API Key
- Go to Settings > API Keys in the Sentrasa dashboard.
- Click Create API Key and give it a name (e.g. "Production", "CI Pipeline").
- Copy the key immediately — it won't be shown again.
You can also create keys programmatically if you already have one:
bash
curl -X POST https://api.sentrasa.com/api/v1/workspaces/{workspace_id}/api-keys \
-H "X-API-Key: rp_your_existing_key" \
-H "Content-Type: application/json" \
-d '{"name": "New Key", "scopes": ["read"]}'Finding Your Workspace ID
Every API endpoint is scoped to a workspace. You need your workspace_id in the URL path.
Find it in the dashboard URL — it's the UUID after /dashboard/ — or check the Settings page.
Security Best Practices
- Never commit API keys to version control. Use environment variables.
- Create separate keys for different environments (dev, staging, prod).
- Revoke keys you're no longer using from the dashboard.
- Keys can be revoked instantly if compromised — create a new one and update your integrations.