Atmee.aiDocs
APIAPI referenceAvatars

Update sponsor settings

PATCH
/v1/avatars/{avatarId}/sponsor

Changes who may spend the avatar's sponsor pool, and when. The request applies all of its fields or none.

  • anonymousAccess: true lets visitors without an account spend the pool. The avatar must be funded first (409 avatar_not_budget_managed: grant credits or turn on auto top-up) and public or unlisted (409 avatar_not_shared).
  • autoTopupEnabled: true needs a threshold and an amount, sent or already stored (400 auto_topup_incomplete).
  • A monetized avatar cannot be sponsored (409 monetized_avatar_cannot_be_sponsored).

Authorization

headerX-Api-Key<token>

Your secret API key (sk_atmee_...; older keys start sk_live_), sent as X-Api-Key. Keep it on your server and never send it to a browser.

Path Parameters

avatarId*string
Formatuuid

Request Body

application/json
  1. body
Properties1 <= properties
maxPerSessionMicrocredits?integer

null clears the cap.

Range1 <= value
exhaustedBehavior?string
Value in"pause""spend_balance"
autoTopupEnabled?boolean
autoTopupThresholdMicrocredits?integer
Range1 <= value
autoTopupAmountMicrocredits?integer
Range1 <= value
anonymousAccess?boolean
anonymousDailySecondsPerVisitor?integer

null clears the per-visitor daily cap.

Range1 <= value

Response Body

Updated; returns the sponsor view.

application/json
  1. response
balance*
settings*
Example Request
curl -X PATCH 'https://api.atmanity.us/v1/avatars/497f6eca-6276-4993-bfeb-53cbbbba6f08/sponsor' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "balance": {    "totalMicrocredits": 0,    "planSourcedMicrocredits": 0,    "topupSourcedMicrocredits": 0,    "couponSourcedMicrocredits": 0  },  "settings": {    "maxPerSessionMicrocredits": 0,    "exhaustedBehavior": "pause",    "autoTopupEnabled": true,    "autoTopupThresholdMicrocredits": 0,    "autoTopupAmountMicrocredits": 0,    "anonymousAccess": true,    "anonymousDailySecondsPerVisitor": 0  }}