On the hosted service, organizations, members, API keys, credits and deployment licenses are managed through the organization API at https://ephemer.al/v1. The customer portal and dashboard use it for you; this page is for scripts and integrations.
Authentication
These endpoints act as a person. Sign in with POST /v1/auth/login and send the returned token as a bearer token. Sessions last 30 days; POST /v1/auth/logout ends one early.
curl https://ephemer.al/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","password":"…"}'The response is {"token": "...", "user": {...}, "organizations": [...]}. Each organization has id, name and your role. Everything below except listing and creating organizations and accepting an invitation needs the owner or admin role in the organization named in the path.
Organizations
/v1/organizationsid, name and role./v1/organizations{"name": "..."} and makes you its owner. Returns 201 with {"id": "org_...", "name": "...", "role": "owner"}./v1/organizations/{id}{"name": "..."}. The name is trimmed and must be 1 to 200 characters. Returns {"id": "org_...", "name": "...", "role": "owner"}. Members get 403.Members
/v1/organizations/{id}/membersid, email, name, role and avatar_url./v1/organizations/{id}/members/{user_id}/v1/organizations/{id}/members/{user_id}{"role": "admin"} or {"role": "member"}./v1/organizations/{id}/ownership{"user_id": "..."}. You become an admin.Invitations
/v1/organizations/{id}/invitations{"email": "...", "role": "member"}. role is admin or member. Returns 201 with token, url and email_delivery.email_delivery is accepted when the email provider took the message, which does not guarantee it reached the inbox. If it is unavailable or failed, share the returned url privately. Invitations expire after 7 days. The invited person accepts with POST /v1/invitations/accept and {"token": "..."}, signed in with the invited email address.
API keys
/v1/organizations/{id}/keysid, name, role and created_at. Secrets are never listed./v1/organizations/{id}/keys{"name": "...", "role": "member"}. role is member or admin and defaults to member.{
"id": "key_0b7e4c2a9d1f8356e4a2c7b9d0f1e3a5",
"name": "production-server",
"role": "member",
"key": "eak_…"
}key value is returned only once. Store it before you close the response./v1/organizations/{id}/keys/{key_id}Profile
These need a signed-in user session; API keys are refused. Users, and each members entry, carry avatar_url: a path such as /v1/users/usr_…/avatar?v=3f2a…, or null.
/v1/me/avatarContent-Type image/png, image/jpeg or image/webp, up to 256 KiB. Returns the same body as GET /v1/auth/me. At most 20 uploads an hour./v1/me/avatar/v1/me/password{"current_password": "...", "new_password": "..."}. The new password is 12 to 72 bytes. Your other sessions are signed out; the one making the request stays signed in. At most 10 attempts an hour./v1/users/{user_id}/avatar404. The URL changes when the picture does, so it can be cached for good.Billing
Money in these endpoints uses cents for Stripe amounts and micros for wallet amounts. See budgets and billing.
/v1/organizations/{id}/balance{"balance_micros": ..., "reserved_micros": ..., "available_micros": ...}: credits held, reserved for unsettled runs, and available for new runs. Check available_micros against a run's budget before you start it./v1/organizations/{id}/billingbalance_micros, reserved_micros, available_microsintegerledgerarrayamount_micros, description, created_at and, where they apply, run_id, payment_id and topup_id.purchase_limitsobjectmin_amount_cents, max_amount_cents and min_threshold_cents. Validate against these instead of hard-coding limits.auto_topupobjectenabled, threshold_cents, amount_cents, payment_method_saved and last_topup_status.payment_methodobject | nullbrand, last4, exp_month, exp_year and source.payment_method_syncstringsynced, or unavailable when Stripe could not be reached. A failed lookup does not mean there is no card.stripe_configuredboolean/v1/organizations/{id}/billing/checkout{"amount_cents": 2500} and returns {"url": "..."} for Stripe Checkout. Add "save_payment_method": true to save the card for automatic top-ups. Amounts are 500 to 1,000,000 cents./v1/organizations/{id}/billing/portal{"url": "..."} for the Stripe customer portal, where cards are managed./v1/organizations/{id}/billing/auto-topup{"enabled": true, "threshold_cents": 1000, "amount_cents": 5000, "consent": true}, or off with {"enabled": false}. Enabling needs a saved card./v1/organizations/{id}/billing/paymentslimit (1 to 100, default 25) and cursor, and returns {"payments": [...], "next_cursor": "..."}. Each payment has amount_cents, refunded_cents, disputed_cents, refund_status, created_at, topup_id and receipt_endpoint./v1/organizations/{id}/billing/payments/{payment_id}/receipt{"url": "..."} for Stripe's receipt, or 404 if Stripe has not provided one.Deployment licenses
/v1/organizations/{id}/license{"entitlement": null}./v1/organizations/{id}/deployments/v1/organizations/{id}/deployments{"name": "..."} and returns its license token once, with the machine ID Ephemeral generated (or the machine_id you send)./v1/organizations/{id}/deployments/{deployment_id}