API reference / Account
Order the AI plans
Puts the plans in a new order: the first becomes the default, the rest are fallbacks tried in that order. Send every plan on the list, each once. Needs an owner or admin.
/api/v1/ai-plansOther ways to call it
troopy ai plans ordertroopy_order_ai_plansIdempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.Body
application/jsonorder*array<string>Every one of the organization's plan ids, default first
At most 20 items
Response
200 · application/jsondata*array<object>17 properties
provider*enum<string>The AI plan the organization's teammates run on
claudechatgptgeminigrokcopilotopenrouterzaikimiminimaxqwenanthropicopenaicursor
method*enum<string> | nullHow the plan signs in: an API key; a code to approve on the provider's site (device_code); or signing in at the provider's site and pasting back the code it shows (paste_code). Null when Troopy can't connect the plan yet
api_keydevice_codepaste_code
status*enum<string>pending: waiting for someone to approve userCode at verificationUrl (device_code), or to sign in at verificationUrl and send the code back (paste_code)
nonependingconnectedfailed
userCode*string | nullThe code to enter at verificationUrl. Shown to owners and admins only
verificationUrl*string | nullexpiresAt*string | nullWhen userCode stops working
keyHint*string | nullThe last four characters of the API key in use
connectedAt*string | nullerror*string | nullWhy the last attempt failed, in words to show people
limitedUntil*string | nullOut of usage until then: teammates use the next plan down the list meanwhile
lapsedAt*string | nullSince when the sign-in lapsed and the plan's CLI couldn't renew it. Sign the plan in again (POST /computer/connection). Null while the sign-in is fresh
id*stringAn AI plan's id, from GET /ai-plans
label*string | nullWhat people call it, like Work
name*stringHow Troopy shows it: the provider's name, with the label or a number when there are several of one provider
isDefault*booleanThe plan teammates start on. The others are fallbacks, tried in order when one is out of usage
model*string | nullThe model of teammates that pick none, from GET /ai-plans/{plan}/models. Null: the plan's CLI picks
effort*enum<string> | nullThe effort of teammates that pick none, on this plan's model. Null: the model's default
lowmediumhighxhighmax