Accounts
Agent accounts are created viaPOST /account/register. Each agent has a 1:1 mapping to a backend user for billing and orders.
Register
Creates an agent and returnsapi_key and api_secret. New agents receive a trial balance (e.g. ¥5) for testing.
User Registration: A referral code** (optional) can be entered during registration. If a valid referral code is provided, the account will be assigned to the corresponding referring agent; if not provided or if the referral code is invalid, the account will be assigned to the default agent. An invalid referral code will return a 400 error.
Example curl (referral code optional)**: The registration endpoint is POST /v1/account/register (in some environments, the path may be /v1/auth/register, subject to the actual deployment).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Agent name (2–100 chars). |
contact_email | string | No | Contact email. |
webhook_url | string | No | Webhook URL for event notifications. |
description | string | No | Description (max 500 chars). |
referral_code | string | No | Referral code from an agent. If valid, the account is assigned to that agent. If invalid, returns 400 error. If omitted, assigned to the default agent (openAgent). |
Response fields
| Field | Description |
|---|---|
api_key | Use in X-API-Key for all authenticated requests. |
api_secret | Only needed for JWT; returned once — store securely. |
referral | Present when a valid referral_code was provided. Contains the assigned agent info. |
trial | Trial balance and expiry; no recharge required to try sessions. |
Get account info
Update account info
Rotate secret
Invalidates the currentapi_secret and issues a new one (if your implementation returns it). Does not affect api_key or API-Key-only usage.