Skip to main content
PATCH
Changes a computer’s name, its mascot, or when it ends. Every field is optional. Send only what you want to change. Renaming and the mascot need you to own the workspace. Setting, moving, or clearing the end needs write access to it, so a member with write access can change the end as long as the request does not also rename the computer or change its mascot.
On a computer that runs by the hour, the prepay moves with the end. A later end holds more of your credits, an earlier one gives some back, and taking the end off gives back what the computer has not used. How a change of the end is billed has the rules.

Path parameters

string
required
Computer UUID or instance_id. Both resolve to the same computer.

Body parameters

string
New computer name, 80 characters at most. Omitted leaves the name alone. An empty, non-string, or longer value returns 400. Workspace owner only.
object
The computer’s mascot look, with all fields optional: color (stone, pearl, graphite, ink, green, blue, red, orange, purple, cyan, pink, yellow, teal, coral), expression (deadpan, friendly, focused, thinking, excited, sleepy, surprised, skeptical, worried, mischievous), and accessory (none, beanie, tophat, party, glasses, sunglasses, bow). Unrecognised fields and values are dropped rather than rejected, so a field you send with an unknown value falls back to the default. null clears the mascot; omitting the field leaves it alone; any other non-object value returns 400. Workspace owner only.
string | null
When the computer ends, as an ISO 8601 time: in the future, and at most 720 hours (30 days) from now. null takes the end off, so the computer is kept until you stop or delete it. Omitted leaves the end alone. Sending back the ends_at the computer already has, as Get computer returned it, changes nothing, even when that time has passed. Send ends_at or ends_in_hours, not both.
integer | null
When the computer ends, as a whole number of hours from now: 1 to 720. null takes the end off, as ends_at: null does. Omitted leaves the end alone.
Only Linux and Windows computers can have an end. Taking an end off works on any computer.

How a change of the end works

When ends_at passes, Orgo stops the computer and marks it ended, then deletes it 7 days later unless it is started. Computers with an end describes that in full. Any change of the end clears ended_at. A computer whose time ran out and that you give a new end runs out that time instead. One you keep with null becomes an ordinary computer and is not deleted. Either way it stays stopped until you start it.

How a change of the end is billed

A computer on the plan is paid for by the plan. Only its end changes, and nothing is prepaid. On a computer that runs by the hour and is running, the prepay follows the new end in the same step:
  • A later end holds the run to the new end. What the old prepay has not used comes back in the same step, so it needs only the extra. When your credit cannot cover the extra plus an hour of your other hourly computers billed by the minute, the request returns 402 and nothing changes.
  • An earlier end holds the run to it and gives back the rest.
  • null gives back what the computer has not used, and it is billed by the minute again.
  • A first end on a computer billed by the minute prepays the run to it. When your credit cannot cover it, the end is still set, the time to it is billed by the minute, and the answer carries prepay_warning. A first or earlier end is never refused for credit, so you can always set a sooner stop.
On an hourly computer that is stopped, any prepay left comes back and the computer stays billed by the minute. One that is still being made returns 409 with code COMPUTER_BUSY.

Who can prepay

Only the workspace owner can prepay an end from their credits. On a paid plan, or an account Orgo has set to pay for every computer from credits, the owner must also be signed in, or use a key with full access or Billing write. An MCP sign-in or a key without Billing write does not prepay there. A caller who may not prepay, but has write access, still sets the end. Nothing more is held: an old prepay runs to its old time, the time past it is billed by the minute, and the answer carries prepay_warning. Moving the end earlier or taking it off only gives credit back, so anyone who may change the end may do those.

Response

string
Computer identifier (UUID).
string
Computer name, after the change.
object | null
Present unless the body sent only an end. The stored mascot, or null when none is set.
string
Present alongside bot_mascot. ISO 8601 timestamp.
string | null
Present when the body changed the end, or sent only the end the computer already has. When the computer ends now, or null when it never ends.
string | null
Present alongside ends_at. null after any change of the end.
string | null
Present alongside ends_at. null after any change of the end.
string | null
Present when the end of a computer that runs by the hour changed. When its prepaid run ends now, or null when it is billed by the minute.
integer | null
Present alongside prepaid_until. What is held from your credits for the run now, in cents. null when prepaid_until is.
integer
Present when some of an earlier prepay came back to your credits, in cents.
string
Present when the end was set but its time was not prepaid, so it is billed by the minute. The new time is billed by the minute. Only the account owner can prepay it, signed in or with a key that has Billing write. when you may not prepay, or The new end is set, and the time to it is billed by the minute: your credit does not cover prepaying all of it. when the credit is short.

Example

Move the end of an hourly Medium ($0.055 an hour) to 8 hours from now. It had 2 hours left of a 4 hour prepay.

Response

Keep a computer forever

A computer on the plan answers with id, name, and the end fields, all null. An hourly computer that had an end also carries prepaid_until and prepaid_cents (both null), and prepay_returned_cents when some of its prepay came back.

Rename a computer

Errors

Authorizations

Authorization
string
header
required

API key authentication. Get your key at orgo.ai/workspaces

Path Parameters

id
string
required

Computer ID. Accepts the computer's UUID or its instance_id.

Body

application/json
name
string

New name, 80 characters at most. Omitted, the name is left alone. An empty, whitespace-only, or longer name is refused with 400.

Required string length: 1 - 80
Example:

"agent-1"

bot_mascot
object | null

The computer's mascot appearance. Omitted, the mascot is left alone; null clears it. Any value that is neither an object nor null is refused with 400.

ends_at
string<date-time> | null

When the computer ends: in the future, at most 720 hours (30 days) from now. null takes the end off, so the computer is kept until you stop or delete it. Omitted, the end is left alone. Sending back the ends_at the computer already has changes nothing, even when that time has passed. Send ends_at or ends_in_hours, not both.

ends_in_hours
integer | null

When the computer ends, in whole hours from now. null takes the end off. Omitted, the end is left alone.

Required range: 1 <= x <= 720

Response

Computer updated. A rename or mascot change carries bot_mascot and updated_at; a change of the end carries the end fields, and for a computer that runs by the hour the prepay after the change.

id
string
Example:

"a3bb189e-8bf9-3888-9912-ace4e6543002"

name
string
Example:

"agent-1"

bot_mascot
object | null

Present unless the body sent only an end. The stored mascot, or null when none is set.

updated_at
string<date-time>

Present alongside bot_mascot.

ends_at
string<date-time> | null

Present when the body changed the end, or sent only the end the computer already has. When the computer ends. null when it never ends.

ended_at
string<date-time> | null

Present when the body changed the end, or sent only the end the computer already has. When Orgo stopped the computer because its time ran out, or marked it ended if it was already off. null when it has not ended, and after any change of the end.

deletes_at
string<date-time> | null

Present when the body changed the end, or sent only the end the computer already has. When Orgo deletes an ended computer: 7 days after ended_at. Starting it before then keeps it. null when it has not ended.

prepaid_until
string<date-time> | null

Present when the end of a computer that runs by the hour changed. A computer that runs by the hour: when its prepaid run ends. null when it is billed by the minute.

prepaid_cents
integer | null

Present when the end of a computer that runs by the hour changed. What is held from your credits for the prepaid run, in cents. null when prepaid_until is.

prepay_returned_cents
integer

Present when some of an earlier prepay came back to your credits, in cents.

prepay_warning
string

Present when the end was set but its time was not prepaid, so it is billed by the minute: The new time is billed by the minute. Only the account owner can prepay it, signed in or with a key that has Billing write. when you may not prepay, or The new end is set, and the time to it is billed by the minute: your credit does not cover prepaying all of it. when the credit is short.