API Overview

The EliteCircle API is a RESTful interface that allows you to integrate our membership and subscription management directly into your own applications. All requests must be made over HTTPS.

Base URL: All API requests to EliteCircle should be made to:
https://api.elitecircle.com/v1

Quick Start

Here's a simple example of how to authenticate and retrieve your account information.

cURL
curl https://api.elitecircle.com/v1/account \\
  -H "Authorization: Bearer sk_live_your_api_key_here" \\
  -H "Content-Type: application/json"

Authentication

The EliteCircle API uses API keys to authenticate requests. You can view and manage your API keys in the EliteCircle Dashboard.

Never expose your secret API keys in client-side code or public repositories. They provide full access to your account.

API Keys

There are two types of API keys:

  • Secret Key (sk_live_...): Used for server-side operations. Can create, read, update, and delete resources.
  • Publishable Key (pk_live_...): Used for client-side operations. Has limited read-only access to ensure security.
JavaScript
const eliteCircle = require('elitecircle-node')('sk_live_your_api_key_here');

const account = await eliteCircle.account.retrieve();
console.log(account.id);

Members

Create, manage, and track your EliteCircle members programmatically.

POST /members

Creates a new member in your EliteCircle organization. The member will receive an email invitation to join.

Request Body

Parameter Type Required Description
email string Required The member's email address.
name string Required The member's full name.
plan_id string Optional The ID of the subscription plan to assign.
role string Optional The member's role (member, admin, editor). Default is member.
Request
curl https://api.elitecircle.com/v1/members \\
  -H "Authorization: Bearer sk_live_your_api_key_here" \\
  -H "Content-Type: application/json" \\
  -d '{
    "email": "sarah.chen@example.com",
    "name": "Sarah Chen",
    "plan_id": "pro_monthly",
    "role": "member"
  }'
Response (201 Created)
{
  "id": "mem_1234567890",
  "object": "member",
  "email": "sarah.chen@example.com",
  "name": "Sarah Chen",
  "role": "member",
  "status": "active",
  "created_at": 1698765432,
  "subscription": {
    "plan_id": "pro_monthly",
    "status": "current_period_end",
    "current_period_end": 1698765432
  }
}

Subscriptions

Manage recurring billing and plan upgrades for your members.

POST /subscriptions

Creates a new subscription for an existing member. This will trigger a payment attempt using the member's default payment method.

Request Body

Parameter Type Required Description
member_id string Required The ID of the member to subscribe.
plan_id string Required The ID of the subscription plan.
payment_method_id string Optional ID of the payment method to use. If omitted, uses the member's default.
Request
curl https://api.elitecircle.com/v1/subscriptions \\
  -H "Authorization: Bearer sk_live_your_api_key_here" \\
  -H "Content-Type: application/json" \\
  -d '{
    "member_id": "mem_1234567890",
    "plan_id": "enterprise_annual"
  }'

Webhooks

Webhooks allow you to build integrations that automatically respond to events in your EliteCircle account.

Supported Events

EliteCircle sends webhook notifications for the following events:

member.created member.deleted subscription.created subscription.updated subscription.cancelled invoice.paid invoice.payment_failed