Skip to content
Skip to Content
Coder Docs

Upsert user AI budget override

PUT
/api/v2/users/{user}/ai/budget/override

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

user*string

User ID, username, or me

Request Body

Upsert user AI budget override request

application/json
  1. body
group_id*string

GroupID is the group the user's spend is attributed to. The user must be a member of this group.

Formatuuid
spend_limit_micros?integer

SpendLimitMicros must not exceed MaxAISpendLimitMicros.

Range0 <= value

Response Body

OK

application/json
  1. response
created_at?string
Formatdate-time
group_id?string
Formatuuid
spend_limit_micros?integer
updated_at?string
Formatdate-time
user_id?string
Formatuuid

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X PUT \	"$CODER_URL/api/v2/users/{user}/ai/budget/override" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN" \	-H "Content-Type: application/json" \	-d '{  "group_id": "306db4e0-7449-4501-b76f-075576fe2d8f"}'
Example Response200
{  "created_at": "2019-08-24T14:15:22Z",  "group_id": "306db4e0-7449-4501-b76f-075576fe2d8f",  "spend_limit_micros": 0,  "updated_at": "2019-08-24T14:15:22Z",  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"}