Resell ILMU memberships from your own platform. Provision users, grant subscriptions, and sign them in with one-time magic links — all over a simple, key-authenticated REST API. Every request is sandboxed to the users your key creates.
Base URLhttps://ilmuhq.com/api/v1
Introduction
The Promoter API lets approved partners sell ILMU memberships alongside their own products. You receive an API key tied to a platform name and domain; from there you can create users, grant or extend plans, and issue magic login links. Responses are JSON with a top-level data object on success and an error object on failure.
Keys are issued by an ILMU administrator. Each user you create gets the email {external_id}@{your-domain}, so the domain on your key must be one you control.
Authentication
Authenticate every request with your secret key in an Authorization: Bearer header (an X-Api-Key header is also accepted). Keys are shown only once at creation — store yours securely and never expose it in client-side code. A missing, invalid, or revoked key returns 401.
Authentication failures return a structured error object. Validation failures return 422 with a message and field-level errors. Because your key is sandboxed, addressing a user or order you don't own returns 404 — identical to one that doesn't exist.
401Unauthenticated. Missing, invalid, or revoked API key.
404Not found. The user or order doesn't exist, or isn't owned by your key.
422Unprocessable. Validation failed — e.g. a duplicate external_id, an unknown plan, or a login request for a user with no active subscription.
429Too many requests. You exceeded the rate limit. Back off and retry.
401 response
JSON
{
"error": {
"code": "unauthenticated",
"message": "A valid API key is required."
}
}
Rate limits
API requests are limited to 120 per minute per key. The magic-link redemption URL is separately limited to 30 per minute. Exceeding a limit returns 429 with a Retry-After header.
Users
Provision and manage the end-users you onboard. Every user you create is sandboxed to your key — you can never see or touch users created by another promoter or via normal sign-up.
POST/api/v1/users
Create a user
Creates a verified student account. The login email is derived as {external_id}@{your-domain} and returned in the response — use it for your own records.
Body parameters
Field
Type
Required
Description
external_id
string
Required
Your unique id for the user (letters, numbers, . _ -). Unique within your key.
Grant access by creating a plan (a comped order + active subscription), extend it, or remove it. Billing is settled on your side, so ILMU records these orders at a zero amount.
POST/api/v1/users/{external_id}/orders
Create a plan
Grants the user an active subscription to a plan for duration_days. Returns the order id and the resulting expiry date.
Sign your users into ILMU with a one-time link. Request a link, then redirect the user's browser to it.
POST/api/v1/users/{external_id}/login
Create a magic link
Returns a single-use login URL valid for 1 minute. Requires an active subscription, otherwise responds 422. Redirect the user to magic_link in their browser — it logs them in and lands them on their dashboard.
Request
cURL
curl -X POST https://ilmuhq.com/api/v1/users/alice/login \
-H "Authorization: Bearer ilmu_live_8f3a2c91b4e7d60a5f12"