Beta. This integration isn’t self-serve yet. Book a call to join, and o11 sets it up with you.
Most providers list an API with one key, and o11 calls it for every buyer. With o11-provisioned accounts, o11 instead creates an account on your platform for each buyer, so each buyer gets their own resources, limits and history with you. You add a small set of endpoints that o11 calls. o11 never fills in your sign-up form.
How it works
- A buyer chooses your service in o11.
- o11 calls your Create account endpoint with the buyer’s o11 identity and email address.
- You return an account ID and an API key for that account. o11 stores the key and uses it only for that buyer.
- Each day, o11 reads the account’s usage from your Usage endpoint and bills the buyer from their o11 wallet.
- When the buyer leaves, o11 calls Close account, or Transfer if the buyer wants to keep the account.
Each buyer’s email address is on o11’s own mail domain, which o11 shares during setup. Verification and billing emails you send to it reach o11.
Endpoints you add
All four are HTTPS endpoints on your API. Paths are yours to choose; you give them to o11 during setup.
Create account
POST with:
| Field | Type | Notes |
|---|---|---|
o11UserId |
string | Stable buyer ID. The same buyer always has the same ID. |
name |
string | The buyer’s name. |
email |
string | The buyer’s o11 email address. |
plan |
string | The plan the buyer chose, from the plans you list with o11. |
Return 201 with:
| Field | Type | Notes |
|---|---|---|
accountId |
string | Your ID for the new account. |
apiKey |
string | A key scoped to this account. o11 never shows it to the buyer. |
dashboardUrl |
string, optional | A sign-in link the buyer can open from o11. |
Creating an account for an o11UserId that already has one returns the existing account with 200.
Usage
GET with accountId and date (YYYY-MM-DD, UTC). Return each billable unit for that day:
| Field | Type | Notes |
|---|---|---|
items |
array | One entry per billable unit. |
items[].requestId |
string, optional | The O11-Request-Id header o11 sent, when the usage came from an o11 call. |
items[].unit |
string | The unit you price, such as call or sandbox_second. |
items[].quantity |
number | How many units. |
o11 compares this with its own count of calls. Return the same answer every time for a finished day.
Close account
POST with accountId. Stop billing, revoke the key and delete the account’s resources. Return 200, also when the account is already closed.
Transfer (optional)
POST with accountId and the buyer’s own email address. Hand the account to the buyer, who keeps it and pays you directly from then on. o11 stops billing it. Return 200 with the new owner’s sign-in link.
Authentication
o11 signs every request with a secret you share during setup:
O11-Timestamp: Unix time in seconds.O11-Signature:v1=followed by the hex HMAC-SHA256 oftimestamp.bodywith your secret. ForGET, the body is the path and query string.
Reject requests whose timestamp is more than 5 minutes from your clock, and compare signatures in constant time.
Retries and errors
Every POST carries an Idempotency-Key header. Return the first result again for a repeated key. o11 retries 429 and 5xx responses with backoff, and treats other 4xx responses as final. Error bodies use:
{ "error": { "code": "PLAN_UNAVAILABLE", "message": "That plan is not available." } }Billing
Usage from provisioned accounts goes on the same monthly statement as your other listings. o11 bills buyers at your listed prices and pays you monthly to your bank account, after a 3% processing fee. See Sell on o11.