Skip to main content
This document provides integration guidelines for the RootRewards API endpoints that allow external services to retrieve quest information and allocate points to user addresses.
You will receive the Base URL, API key, and testing instructions when your Quest application is approved.
Quests and Campaigns explained
  • A Quest is a single earnable action with its own points budget, active window, and rules. Points are always allocated to a user for completing a quest using POST /quests/{questId}.
  • A Campaign is a collection or promotion that groups related quests for discovery and presentation (e.g., via GET /campaigns/{id} or GET /quests). Campaigns don’t hold balances and don’t allocate points—allocations always happen at the quest level.

Authentication

Some endpoints require an API key passed via the x-api-key header. The API key must:
  • Start with the prefix sk_
  • Be associated with the quest owner account

Endpoints

Get Quest Details

Retrieves detailed information about a specific quest.

Parameters

Headers

Response

Status Codes


Get Public Quests

Retrieves public quests.

Parameters

Headers

Response

Status Codes


Get Campaign Details

Retrieves public campaign details.

Parameters

Headers

Response

Status Codes


Allocate Quest Points

Allocates points from a quest to a specified Pass address.

Parameters

Headers

Request Body

Response

Status Codes


Error Handling

Common Error Scenarios

  1. Quests Disabled: When the quest feature flag is disabled
  2. Quest Not Active: When current time is outside quest’s start/end period
  3. Insufficient Points: When requested points exceed quest’s remaining points
  4. Account Not Found: When the target address doesn’t have an associated account
  5. Action Type Inactive: When the quest’s action type is deactivated

Integration Notes

  1. Address Format: Addresses are automatically converted to checksum format
  2. Quest Ownership: Only quest owners can retrieve detailed information or allocate points
  3. Real-time Validation: All requests validate quest status, remaining points, and account existence
  4. Earning Periods: Points are allocated within the current active earning period

Security Considerations

  • Store API keys securely and never expose them in client-side code
  • Use HTTPS for all API communications
  • Validate addresses on your end before sending requests
  • Monitor API usage for unusual patterns