IntegrationsAPI Integration

API Integration

Getting Started

Obtaining an API Key

  1. Navigate to the API Integration page in your account settings
  2. Generate a new API key for your project

Authentication

API Key Types

Reward provides two types of API keys:

Key TypePrefixUsage
Sandbox Keyssk_test_Safe for integration testing
Production Keyssk_live_Used for real data and transactions

Authenticating Requests

Include your secret key in the Authorization header for all API requests:

Authorization: Bearer sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

🔒 Security Best Practices

  • Keep your API keys confidential
  • Never expose keys in client-side code
  • Use environment variables to manage keys
  • Rotate keys periodically

Request and Response Handling

HTTP Status Codes

The Reward API uses standard HTTP status codes to indicate the success or failure of a request:

Code RangeMeaningAction
200-299SuccessRequest completed successfully
400-499Client ErrorReview your request parameters
500-599Server ErrorRetry request or contact support

Common Error Responses

If there is an error, you will receive a 4xx or 5xx response code along with an error message in the response body:

{
  "error": {
    "code": "missing_field",
    "message": "Missing required field: `user_id`"
  }
}