Redeem a code
Redeems an invite or credit code for the account. A code can add
credits, unlock Atmee V2 (see v2Access on GET /v1/account), or
both, and the answer says what it gave. Below Pro, an invite code
is what unlocks V2. Each account
redeems a code at most once.
Only a signed-in user may redeem: an API key gets 403 login_required,
so a leaked key cannot spend the account's codes. v2 access applies from
the next request.
AuthorizationBearer <JWT>A signed-in user's access token (from OAuth sign-in, as an MCP client
uses, or a normal login), sent as Authorization: Bearer <token>
where the deployment accepts user tokens.
- The user acts for one account: their only one, or the one
X-Account-Idnames (403 account_not_allowedif it is not theirs). A user of several accounts who names none gets409 account_ambiguous, whoseaccountslists the choices. - The user may read and write that account's avatars and start its sessions, which are billed to it.
- Anonymous, banned or deleted users, and former members, get
401. - Do not send it together with
X-Api-Key(400). An API key ignoresX-Account-Id.
application/json- body
code*stringThe code, as given (case and surrounding spaces do not matter).
1 <= length <= 64The code was redeemed.
application/json- response
microcreditsGranted*integerCredits the code added, in microcredits (100 = 1 credit); 0 for a code that only gives v2 access.
int64v2Access?stringThe account's v2 access after redeeming, as GET /v1/account reports it. Absent when it could not be read.
"granted""invite_required""unavailable"curl -X POST 'https://api.atmanity.us/v1/account/redeem' \ -H 'Content-Type: application/json' \ -d '{ "code": "string"}'{ "microcreditsGranted": 0, "v2Access": "granted"}
