Atmee.aiDocs
APIAPI referenceAccount

Redeem a code

POST
/v1/account/redeem

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.

Authorization

headerAuthorizationBearer <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-Id names (403 account_not_allowed if it is not theirs). A user of several accounts who names none gets 409 account_ambiguous, whose accounts lists 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 ignores X-Account-Id.

Request Body

application/json
  1. body
code*string

The code, as given (case and surrounding spaces do not matter).

Length1 <= length <= 64

Response Body

The code was redeemed.

application/json
  1. response
microcreditsGranted*integer

Credits the code added, in microcredits (100 = 1 credit); 0 for a code that only gives v2 access.

Formatint64
v2Access?string

The account's v2 access after redeeming, as GET /v1/account reports it. Absent when it could not be read.

Value in"granted""invite_required""unavailable"
Example Request
curl -X POST 'https://api.atmanity.us/v1/account/redeem' \  -H 'Content-Type: application/json' \  -d '{  "code": "string"}'
Example Response
{  "microcreditsGranted": 0,  "v2Access": "granted"}