API Reference
API Keys
Create and manage API keys for authenticating API requests. Keys can be scoped to specific permissions.
Key Prefixes
rk_live_Live mode keys
Production keys that access real data and count against usage limits.
rk_test_Test mode keys
Sandbox keys that return simulated data and don't count against limits.
Create a new API key. The full key is only shown once at creation time - store it securely.
Request Bodyrequired
namestringrequiredDisplay name for the key
scopesarrayPermission scopes (default: all scopes)
tests:readtests:writedomains:readdomains:writemonitors:readmonitors:writewebhooks:managebilling:manageexpires_atstring<date-time>Optional expiration date
Response
idstringKey identifier (key_xxx)
objectstringAlways 'api_key'
namestringkeystringThe full API key (only shown once!)
key_hintstringLast 4 characters for identification
scopesarraycreated_atstring<date-time>expires_atstring<date-time>Example Request
curl -X POST https://api.reachscore.co/v1/keys \
-H "Authorization: Bearer rk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "CI/CD Pipeline",
"scopes": ["tests:read", "tests:write"]
}'Example Response
{
"id": "key_3iS8wW2xYbC4",
"object": "api_key",
"name": "CI/CD Pipeline",
"key": "rk_live_newkeyvalue123abc...",
"key_hint": "...abc",
"scopes": ["tests:read", "tests:write"],
"created_at": "2026-03-11T10:30:00Z",
"expires_at": null,
"livemode": true
}Authentication Context
Returns information about the currently authenticated API key and its associated organization, permissions, and usage.
Response
key_idstringkey_namestringscopesarrayorganizationobjectOrganization details
usageobjectCurrent usage statistics
livemodebooleanExample Request
curl https://api.reachscore.co/v1/auth/me \ -H "Authorization: Bearer rk_live_xxx"
Example Response
{
"key_id": "key_3iS8wW2xYbC4",
"key_name": "CI/CD Pipeline",
"scopes": ["tests:read", "tests:write"],
"organization": {
"id": "org_abc123",
"name": "Your Company",
"plan": "team"
},
"usage": {
"tests_this_month": 145,
"tests_limit": 1000,
"domains": 3,
"domains_limit": 10
},
"livemode": true
}Security Best Practices
- Store API keys in environment variables, never in code
- Use the minimum required scopes for each key
- Rotate keys periodically and after any suspected exposure
- Create separate keys for different environments and services
- Monitor key usage and revoke unused keys