Set one person's cap on the AI allowance
PUT
/api/billing/ai-caps/people/{personId}
const url = 'https://forge.example.com/api/billing/ai-caps/people/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"capMicrodollars":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://forge.example.com/api/billing/ai-caps/people/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "capMicrodollars": 1 }'Send capMicrodollars, a month, in place of the default for this person: 0 switches the assistant off for them on the instance’s account, and null takes their own cap away so the default applies again. A person who reaches their cap is told that their own share is used up and who can raise it; everyone else goes on. 404 for someone not in the organization. Recorded in the activity log. Answers the AI allowance by person. For administrators.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”personId
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
capMicrodollars
required
null | integer | string format: int64
Example generated
{ "capMicrodollars": 1}Responses
Section titled “Responses”OK
Media typeapplication/json
object
applies
required
boolean
poolMicrodollars
required
integer | string format: int64
poolSpentMicrodollars
required
integer | string format: int64
default
required
object
kind
required
string
microdollars
required
null | integer | string format: int64
percent
required
null | integer | string format: int32
defaultCapMicrodollars
required
null | integer | string format: int64
version
required
integer | string format: int32
people
required
Array<object>
object
personId
required
string format: uuid
name
required
string
active
required
boolean
spentMicrodollars
required
integer | string format: int64
ownCapMicrodollars
required
null | integer | string format: int64
capMicrodollars
required
null | integer | string format: int64
stopped
required
boolean
Example generated
{ "applies": true, "poolMicrodollars": 1, "poolSpentMicrodollars": 1, "default": { "kind": "example", "microdollars": 1, "percent": 1 }, "defaultCapMicrodollars": 1, "version": 1, "people": [ { "personId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "active": true, "spentMicrodollars": 1, "ownCapMicrodollars": 1, "capMicrodollars": 1, "stopped": true } ]}default
Section titled “default”A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.
Media typeapplication/problem+json
object
type
string
title
string
status
integer
detail
string
instance
string
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}