Get Users

Get all users in your account

Get Users

This endpoint allows you to retrieve all users associated with your account, including their quest and reward information.

Authentication

To access this endpoint, you must include an Authorization header with your API key:

Authorization: YOUR_API_KEY

Endpoint

GET /api/v1/getUsers

Query Parameters

  • customerId (string, required): The unique identifier of the customer to retrieve users for

Response

Success Response (200 OK)

{
  "users": [
    {
      "id": "string",
      "name": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "quests": {
        "total": number,
        "completed": number,
        "active": number
      },
      "rewards": {
        "total": number,
        "redeemed": number,
        "available": number
      }
    }
  ],
  "pagination": {
    "total": number,
    "page": number,
    "limit": number,
    "totalPages": number
  }
}

Error Responses

  • 400 Bad Request

    {
      "error": "Invalid parameters",
      "details": {
        // Validation error details
      }
    }
    
    • When query parameters are invalid
    • When page or limit values are out of range
  • 403 Forbidden

    {
      "error": "No API Key in request"
    }
    
    • When no API key is provided
    • When the API key is invalid
    • When the endpoint is not allowed with your current subscription plan
  • 429 Too Many Requests

    {
      "error": "You have reached the user retrieval limit"
    }
    
    • When you've reached your plan's user limit
    • When you've reached your plan's transaction limit
  • 500 Internal Server Error

    {
      "error": "An unexpected error occurred",
      "details": "Error message"
    }
    

Rate Limits

Rate limits vary by subscription plan:

  • Grow Plan: 100 API calls per minute
  • Pro Plan: 500 API calls per minute
  • Enterprise Plan: Unlimited API calls

Notes

  • The endpoint supports pagination to handle large numbers of users
  • The search parameter can be used to filter users by their ID or name
  • The response includes summary statistics for each user's quests and rewards
  • The pagination object provides information about the current page and total results
  • Users are sorted by creation date in descending order (newest first)