API Reference
EliteCircle's REST API gives you full programmatic control over users, memberships, subscriptions, and courses. Build custom integrations, automate workflows, and power your own applications.
https://api.elitecircle.com/v2
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Authentication
EliteCircle uses API keys to authenticate requests. You can manage your API keys from the Dashboard > Developer Settings. Keep your API keys secret â do not share them in publicly accessible locations.
API Key Format
API keys start with ec_live_ for production and ec_test_ for sandbox/test environments. Always use test keys during development.
curl https://api.elitecircle.com/v2/memberships \ -H "Authorization: Bearer ec_live_sk_4f8a2b..." \ -H "Content-Type: application/json"
import elitecircle elitecircle.api_key = "ec_live_sk_4f8a2b..." memberships = elitecircle.Membership.list()
const elitecircle = require('elitecircle')('ec_live_sk_4f8a2b...'); const memberships = await elitecircle.memberships.list();
OAuth 2.0
For applications that act on behalf of users, use OAuth 2.0 with the membership:read, membership:write, subscription:read, and subscription:write scopes.
GET https://auth.elitecircle.com/oauth/authorize? client_id=your_client_id &redirect_uri=https://yourapp.com/callback &response_type=code &scope=membership:read subscription:write
Base URL & Versions
The current stable API version is v2. We maintain backward compatibility within major versions and deprecate old versions with at least 12 months of notice.
| Version | Status | Deprecation Date | Notes |
|---|---|---|---|
| v2 (current) | Active | â | Latest version with all features |
| v1 | Deprecated | Dec 31, 2025 | Legacy â migrate to v2 |
HTTP Methods
| Method | Description |
|---|---|
| GET | Retrieve a resource or collection of resources |
| POST | Create a new resource or trigger an action |
| PUT | Update an existing resource (full replacement) |
| PATCH | Partially update an existing resource |
| DEL | Delete a resource permanently |
Errors
EliteCircle uses standard HTTP status codes to indicate the success or failure of a request. Codes in the 2xx range indicate success, 4xx indicate client errors, and 5xx indicate server errors.
{
"error": {
"code": "invalid_request_error",
"message": "The card was declined.",
"type": "card_error",
"param": "card",
"code_param": "card_declined"
}
}
Common Error Codes
Rate Limiting
API requests are rate limited per API key. You can inspect your remaining requests from the response headers.
Response Headers
| Header | Description |
|---|---|
| X-RateLimit-Limit | Maximum requests allowed per minute |
| X-RateLimit-Remaining | Remaining requests in current window |
| X-RateLimit-Reset | Unix timestamp when the window resets |
| Retry-After | Seconds to wait before retrying (only on 429) |
Users
Users represent individual accounts in the EliteCircle platform. Each user can have one or more memberships and subscriptions.
Returns a paginated list of all users. Use query parameters to filter and sort results.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | Number of results (1â100, default 20) |
| cursor | string | No | Pagination cursor from previous response |
| status | string | No | Filter by: active, paused, canceled |
| created_after | datetime | No | Filter users created after this date |
Example Request
curl https://api.elitecircle.com/v2/users?limit=10&status=active \ -H "Authorization: Bearer ec_live_sk_4f8a2b..."
Example Response
{
"data": [
{
"id": "usr_8f3k2m9n1p",
"email": "sarah.chen@example.com",
"name": "Sarah Chen",
"avatar_url": "https://cdn.elitecircle.com/avatars/usr_8f3k2m9n1p.jpg",
"status": "active",
"member_since": "2024-01-15T10:30:00Z",
"membership_tier": "professional",
"metadata": {},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2025-06-10T14:22:00Z"
}
],
"has_more": true,
"next_cursor": "eyJpZCI6InVzcl8..."
}
Creates a new user account in your EliteCircle organization.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | User's email address (must be unique) | |
| name | string | Yes | Full display name |
| membership_tier | string | No | Auto-enroll tier: starter, professional, enterprise |
| metadata | object | No | Custom key-value pairs (max 20 keys) |
{
"email": "newuser@example.com",
"name": "Marcus Rodriguez",
"membership_tier": "professional",
"metadata": {
"source": "api",
"team_id": "team_abc123"
}
}
Response
{
"id": "usr_3m7k9p2q5r",
"email": "newuser@example.com",
"name": "Marcus Rodriguez",
"status": "active",
"membership_tier": "professional",
"created_at": "2025-06-15T08:00:00Z"
}
Retrieves the details of an existing user.
{user_id} is a path parameter.
{
"id": "usr_8f3k2m9n1p",
"email": "sarah.chen@example.com",
"name": "Sarah Chen",
"status": "active",
"membership": {
"id": "mem_x7y2w4z8",
"tier": "professional",
"current_period_start": "2025-06-01T00:00:00Z",
"current_period_end": "2025-07-01T00:00:00Z",
"trial_ends_at": null
},
"created_at": "2024-01-15T10:30:00Z"
}
Updates the specified user by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
{
"name": "Sarah Chen-Chang",
"metadata": {
"department": "engineering"
}
}
Permanently deletes a user and all associated data. This action cannot be undone.
user.deleted webhook will be triggered.
{
"id": "usr_8f3k2m9n1p",
"deleted": true
}
Memberships
Memberships define a user's access tier and entitlements within the EliteCircle platform. Each user can have at most one active membership at a time.
Example Response
{
"data": [
{
"id": "mem_x7y2w4z8",
"user_id": "usr_8f3k2m9n1p",
"tier": "professional",
"status": "active",
"current_period_start": "2025-06-01T00:00:00Z",
"current_period_end": "2025-07-01T00:00:00Z",
"trial_ends_at": null,
"entitlements": {
"unlimited_courses": true,
"live_sessions": "weekly",
"mentorship": true,
"ai_paths": true,
"certifications": true
},
"created_at": "2025-06-01T00:00:00Z"
}
],
"has_more": false
}
Request Body
{
"user_id": "usr_8f3k2m9n1p",
"tier": "professional",
"billing_cycle": "monthly",
"coupon_code": "LAUNCH2025",
"trial_days": 14
}
Returns the full membership object including entitlements, billing info, and subscription details.
Used to change membership tier (upgrade/downgrade). Changes to tier take effect at the next billing cycle.
{
"tier": "enterprise",
"effective_date": "next_billing_period"
}
Cancels the membership at the end of the current billing period. The user retains access until the period expires.
Cancellation-Reason header to track why the membership was canceled.
Subscriptions
Subscriptions handle recurring billing for memberships. Each subscription is tied to a specific membership and includes payment details, invoices, and usage metrics.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| membership_id | string | Yes | ID of the membership to subscribe |
| payment_method_id | string | Yes | Stripe payment method token |
| billing_cycle | string | No | monthly or yearly (default: monthly) |
| coupon_code | string | No | Discount coupon code |
| metadata | object | No | Custom metadata for the subscription |
Example Response
{
"id": "sub_m4n7p2q9r3",
"membership_id": "mem_x7y2w4z8",
"status": "active",
"tier": "professional",
"amount": 4900,
"currency": "usd",
"billing_cycle": "monthly",
"next_payment_date": "2025-07-01T00:00:00Z",
"payment_method": {
"id": "pm_1N2o3p4q5r",
"brand": "visa",
"last4": "4242",
"exp_month": 12,
"exp_year": 2027
},
"created_at": "2025-06-01T10:00:00Z"
}
Updates payment method, billing cycle, or applies a coupon to an existing subscription.
{
"billing_cycle": "yearly",
"payment_method_id": "pm_new_card_token",
"coupon_code": "SAVE20"
}
Pauses the subscription, keeping the user's data intact. The pause can last up to 90 days. The user retains access to their content during the pause period.
Cancels the subscription. The user's access continues until the end of the current billing period. No further charges are made.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | No | Filter by: paid, pending, failed |
| limit | integer | No | Number of invoices (default 10) |
Example Invoice Response
{
"id": "inv_k8j3m2p5q9",
"subscription_id": "sub_m4n7p2q9r3",
"amount": 4900,
"currency": "usd",
"status": "paid",
"description": "Professional tier â June 2025",
"due_date": "2025-06-01T00:00:00Z",
"paid_at": "2025-06-01T10:05:23Z",
"pdf_url": "https://cdn.elitecircle.com/invoices/inv_k8j3m2p5q9.pdf",
"line_items": [
{
"description": "Professional Monthly Plan",
"amount": 4900,
"quantity": 1
}
]
}
Courses
Access the full catalog of courses available within EliteCircle. Course data includes metadata, pricing, instructor info, and progress tracking.
Example Response
{
"data": [
{
"id": "crs_9a2b3c4d5e",
"title": "Advanced React Patterns",
"description": "Master modern React with advanced hooks, patterns, and performance optimization.",
"instructor": {
"name": "Alex Kim",
"title": "Senior Engineer at Vercel"
},
"category": "engineering",
"level": "advanced",
"duration_hours": 12,
"lessons_count": 48,
"is_published": true,
"thumbnail_url": "https://cdn.elitecircle.com/courses/crs_9a2b3c4d5e/thumb.jpg",
"tags": [
"react",
"javascript",
"web-dev"
],
"requires_tier": "professional",
"created_at": "2025-03-15T00:00:00Z"
}
],
"has_more": true
}
Returns the full course object including the complete curriculum (lessons, quizzes, assignments), instructor details, and student enrollment counts.
Only instructors and content admins can create courses. The course enters a draft state and must be published manually.
{
"title": "Building AI-Powered Apps",
"description": "Learn to integrate LLMs into web applications.",
"category": "engineering",
"level": "intermediate",
"lessons": [
{
"title": "Introduction to LLMs",
"type": "video",
"duration_minutes": 25,
"content_url": "https://cdn.elitecircle.com/lessons/..."
}
]
}
Webhooks
EliteCircle sends webhook events to notify your server of important platform events. Configure your webhook endpoint in the Dashboard > Developer > Webhooks.
X-EliteCircle-Signature header and your webhook secret key.
Event Types
{
"id": "evt_7k3m9p2q",
"type": "membership.created",
"created_at": "2025-06-01T10:00:00Z",
"data": {
"id": "mem_x7y2w4z8",
"user_id": "usr_8f3k2m9n1p",
"tier": "professional",
"status": "active",
"trial_ends_at": "2025-06-15T00:00:00Z"
}
}
{
"id": "evt_2n5p8q3r",
"type": "subscription.payment_succeeded",
"created_at": "2025-07-01T00:00:00Z",
"data":
{
"subscription_id": "sub_m4n7p2q9r3",
"invoice_id": "inv_k8j3m2p5q9",
"amount": 4900,
"currency": "usd",
"payment_method": "visa_4242"
}
}
{
"id": "evt_9m2p5q8r",
"type": "subscription.payment_failed",
"created_at": "2025-07-01T00:00:00Z",
"data": {
"subscription_id": "sub_m4n7p2q9r3",
"failure_reason": "card_declined",
"amount": 4900
}
}
All Available Events
| Event Type | Description |
|---|---|
| user.created | New user registered |
| user.updated | User profile updated |
| user.deleted | User permanently deleted |
| membership.created | New membership created |
| membership.updated | Membership tier changed |
| membership.canceled | Membership cancelled |
| subscription.created | New subscription started |
| subscription.payment_succeeded | Payment processed successfully |
| subscription.payment_failed | Payment failed |
| subscription.paid | Invoice paid |
| subscription.paused | Subscription paused |
| subscription.resumed | Subscription resumed after pause |
| subscription.canceled | Subscription cancelled |
| course.completed | User completed a course |
| certificate.issued | New certificate issued to user |
Official SDKs
Official SDKs are available for the most popular languages. All SDKs are open-source and available on GitHub.
| Language | Package | GitHub |
|---|---|---|
| Node.js | npm install elitecircle |
github.com/elitecircle/elitecircle-node |
| Python | pip install elitecircle |
github.com/elitecircle/elitecircle-python |
| Ruby | gem install elitecircle |
github.com/elitecircle/elitecircle-ruby |
| Go | go get github.com/elitecircle/elitecircle-go |
github.com/elitecircle/elitecircle-go |
| PHP | composer require elitecircle/elitecircle-php |
github.com/elitecircle/elitecircle-php |
Postman Collection
A curated Postman collection is available with all endpoints pre-configured, including example requests and responses. Import it directly into your workspace.
âļ Import to PostmanOpenAPI Specification
The full OpenAPI 3.0 specification is available for download. Use it to generate clients, write documentation, or integrate with code generation tools.
đ Download OpenAPI Spec (YAML)