v1.0.2
Operational

API Overview

Welcome to the EliteCircle API documentation. This RESTful API allows you to programmatically manage memberships, subscriptions, course enrollments, and automated webhooks.

Base URL: https://api.elitecircle.com/v1
Rate Limit: 120 requests/minute per API key
Format: JSON Request/Response, UTF-8 encoding

Authentication

Authenticate all requests using Bearer tokens in the Authorization header. Generate your API key from the Developer Dashboard.

Header
Authorization: Bearer ek_live_8f7a9c2d4e5b6f1a2b3c4d5e

Test mode keys begin with ek_test_ and are sandboxed. Production keys begin with ek_live_.

Members

GET /members Retrieve paginated list of members

Returns a list of members sorted by creation date. Supports filtering by status, plan, and query search.

ParameterTypeRequiredDescription
limitintegerNoItems per page (max 100)
offsetintegerNoPagination offset
statusstringNoFilter: active, paused, canceled
✓ 200 OK
Response
{
  "data": [
    {
      "id": "mem_9x8y7z6w",
      "email": "alex@example.com",
      "status": "active",
      "created_at": "2024-11-15T08:30:00Z"
    }
  ],
  "pagination": {
    "total": 1240,
    "limit": 20,
    "offset": 0
  }
}
POST /members Create a new member

Creates a new member account. Sends a verification email automatically.

ParameterTypeRequiredDescription
emailstringRequiredValid email address
first_namestringRequiredMember first name
last_namestringRequiredMember last name
plan_idstringNoAssign a subscription plan immediately
Request Body
{
  "email": "jane.doe@company.com",
  "first_name": "Jane",
  "last_name": "Doe",
  "plan_id": "plan_pro_monthly"
}
POST /subscriptions Create or update a subscription

Initiates a new subscription for an existing member. Requires a valid payment method ID.

ParameterTypeRequiredDescription
member_idstringRequiredMember identifier
plan_idstringRequiredTarget plan (starter, pro, enterprise)
payment_method_idstringRequiredStripe/PayPal token
trial_daysintegerNoGrace period before first charge
✓ 201 Created
Response
{
  "id": "sub_3a2b1c0d",
  "status": "trialing",
  "current_period_end": "2024-12-15T00:00:00Z",
  "cancel_at_period_end": false
}
POST /courses/{course_id}/enroll Enroll member in a course

Grants immediate access to a specific course module. Triggers course.enrolled webhook.

Request
{
  "member_id": "mem_9x8y7z6w",
  "grant_certificate": true
}
POST /webhooks Register event endpoint

Subscribe to real-time events. EliteCircle will POST JSON payloads to your endpoint.

ParameterTypeRequiredDescription
urlstringRequiredHTTPS endpoint
eventsarrayRequiredEvent types to listen to
secretstringNoHMAC signature verification key
Supported Events
["member.created", "subscription.updated", "course.completed", "payment.failed"]

Error Handling

The API uses standard HTTP status codes. Error responses include a structured error object.

4xx/5xx Response
{
  "error": {
    "code": "subscription_expired",
    "message": "Access denied. Subscription has ended.",
    "request_id": "req_8f7a9c2d"
  }
}