Tolarai.com

API Documentation

Integrate with Tolarai.com using our REST API — full reference for members, memberships, events, billing, webhooks, and more.

Getting Started
Authentication and base configuration

Base URL

https://api.yourdomain.com/v1

Authentication

Use Bearer token authentication:

Authorization: Bearer YOUR_API_KEY

Get Your API Key

Generate API keys in Settings → Integrations → API Keys. Keep them secure!

Core Resources
API endpoints for managing members, memberships, and events

List Members

GET /members?limit=50&offset=0

Response:
{
  "data": [
    {
      "id": "mem_123",
      "first_name": "John",
      "last_name": "Doe",
      "email": "john@example.com",
      "status": "active",
      "join_date": "2026-01-15"
    }
  ],
  "total": 150,
  "has_more": true
}

Create Member

POST /members
Content-Type: application/json

{
  "first_name": "Jane",
  "last_name": "Smith",
  "email": "jane@example.com",
  "phone": "+1234567890",
  "date_of_birth": "1990-05-15"
}

Get Member

GET /members/{member_id}

Response:
{
  "id": "mem_123",
  "first_name": "John",
  "email": "john@example.com",
  "status": "active",
  "memberships": [
    {
      "id": "ms_456",
      "plan_id": "plan_789",
      "status": "active",
      "start_date": "2026-01-15",
      "end_date": "2027-01-15"
    }
  ]
}
Webhooks
Real-time event notifications

Subscribe to webhooks to get real-time updates when members join, memberships renew, or events occur.

Webhook Events

member.created

Fired when a new member joins

membership.renewed

Fired when membership is renewed

membership.expired

Fired when membership expires

payment.received

Fired when payment is received

Webhook Payload

{
  "id": "wh_123",
  "event": "member.created",
  "timestamp": "2026-04-09T10:30:00Z",
  "data": {
    "member_id": "mem_123",
    "email": "john@example.com",
    "first_name": "John"
  },
  "signature": "sha256=..."
}
Rate Limiting

Standard Plan: 100 requests/minute

Professional Plan: 500 requests/minute

Enterprise Plan: Custom limits

Rate limit info is included in response headers: X-RateLimit-Remaining, X-RateLimit-Reset

Error Handling
HTTP/1.1 400 Bad Request
Content-Type: application/json

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid email address",
    "details": {
      "field": "email",
      "reason": "must be a valid email"
    }
  }
}