API keys
- Create keys in the console under Developers → API keys. The full key is shown once; Techrace only stores a hash.
- Project keys start with rl_live_. Every key has an expiry date and can be revoked at any time.
- Keep keys on your server. If one leaks, revoke it and create a new one.
Sending the key
Put the key in the Authorization header as a Bearer token:
curl -X GET "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/customers?limit=10" \
-H "Authorization: Bearer $TECHRACE_API_KEY"| Problem | Response |
|---|---|
| No Authorization header | 401 authentication_required |
| Unknown, revoked or expired key | 401 invalid_api_key |
| Key lacks the endpoint's permission | 403 forbidden |
Find your project ID
Every project endpoint includes your project ID: /api/v1/projects/{project_id}/…. It is shown in the console under Developers → API keys, or ask the API with just your key:
curl -X GET "https://YOUR_DOMAIN/api/v1/me" \
-H "Authorization: Bearer $TECHRACE_API_KEY"{
"project_id": "2c5e8a1f-4b7d-4e93-a160-8d3f9b2c7e41",
"project_name": "My workspace",
"key": {
"id": "7a1d3c9e-5f2b-4c80-9e64-1b8d0f3a6c25",
"scopes": [
"customers:read",
"connections:read"
],
"customer_id": null
}
}Permissions (key scopes)
Each endpoint in the API reference lists the one permission it needs. Give each key only what that server needs.
| Permission | Allows |
|---|---|
customers:read / customers:write | List, read, create and rename profiles |
connections:read / connections:write | List connections; create connect links, disconnect |
executions:read / executions:write | Read and create posts (publishing) |
media:write | Upload images and videos |
analytics:read | Analytics reports and Search Console |
inbox:read / inbox:write | Read and act on comments and messages |
inbox:operations:read | Read the status of inbox actions |
email:read | Read mail, threads, folders |
email:drafts:write / email:send / email:modify | Create drafts, send, organise mail |
email:operations:read | Read the status of mail actions |
ads:read / ads:write | Read ads; make ad changes |
ads:spend | Changes that can spend money |
ads:operations:read | Read the status of ad changes |
events:read | Read the event log |
webhooks:read | Read webhook endpoints and deliveries |
usage:read | Read usage and billing counts |
Idempotency-Key header
Calls that create something on a platform (posts, ad changes, inbox and mail actions) require an Idempotency-Key header (8–120 characters). Re-sending the same key with the same body returns the original result instead of acting twice; the same key with a different body returns 409 idempotency_conflict.