Skip to main content

API Key Authentication

The PeopleContext API uses API keys to authenticate requests. Include your API key in the Authorization header as a Bearer token.
Keep your API key secure! Never commit it to version control or expose it in client-side code.

Making Authenticated Requests

Include your API key in the Authorization header:

Environment Variables

Store your API key in environment variables to keep it secure:

Error Responses

401 Unauthorized

Missing API key:
Invalid or revoked API key:

403 Forbidden

Organization is inactive:

429 Too Many Requests

Rate limit exceeded (1000 requests per minute):
Monthly quota limit exceeded:

Rate Limits

Rate Limit: 1,000 requests per minute per API key
Exceeding this limit will result in HTTP 429 (Too Many Requests) responses with a Retry-After header.

Quota Tracking

All authenticated API responses include headers to help you monitor your monthly quota usage:

Example Response Headers

Use these headers to track your usage programmatically and avoid hitting your monthly quota limit.

Best Practices

  • Never hardcode API keys in your source code
  • Use environment variables or secret management systems
  • Rotate keys regularly
  • Use different keys for development and production
  • Implement exponential backoff for rate limit errors
  • Cache responses when possible
  • Monitor the rate limit headers
  • Always check response status codes
  • Implement retry logic for transient errors (500, 503)
  • Handle rate limits gracefully