Update computer
Rename a computer, set its mascot, or set, move, or clear when it ends.
Path parameters
Body parameters
400. Workspace owner only.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.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.1 to 720. null takes the end off, as ends_at: null does. Omitted leaves the end alone."delete" is accepted and changes nothing. Sent alone, it needs a computer that has an end, and answers with the end fields as they are, on_end included. For a computer with no end it returns 400 with code INVALID_ENDS. Omitted or null is not sent. Any other value, "stop" included, returns 400 with code INVALID_ENDS: A computer with an end is deleted when its time is up. To keep a computer, leave out the end.How a change of the end works
ends_in_hours counts from now, not from the end the computer has, so a small number can shorten it. To add to the time a computer has left, use Extend computer, which also goes past 720 hours, up to 90 days from now.
When ends_at passes, Orgo deletes the computer, running or stopped, with everything on it. Every end you set or move here deletes it. To keep a computer, take the end off with null. Computers with an end describes that in full.
A computer whose end was set before every end deleted the computer reports on_end: "stop": it is stopped at its end and deleted 7 days later. Any new end you give it deletes it instead. Any change of the end clears ended_at, so a computer stopped when such an end ran out either gets the new end or, 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 that are not prepaid, the request returns
402and nothing changes. - An earlier end holds the run to it and gives back the rest.
nullgives back what the computer has not used, and it is billed by the hour again, with no prepay.- A first end on an hourly computer with no prepay prepays the run to it. When your credit cannot cover it, the end is still set, the time to it is billed by the hour, and the answer carries
prepay_warning. A first or earlier end is never refused for credit, so you can always set a sooner end.
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 hour, and the answer carriesprepay_warning. Moving the end earlier or taking it off only gives credit back, so anyone who may change the end may do those.
Response
null when it never ends.ends_at. Read only: "delete" when the computer has an end, "stop" for an end set before every end deleted the computer, or null with no end.ends_at. When Orgo deletes the computer: ends_at for on_end "delete", or 7 days after ended_at for an on_end "stop" computer that has ended. null otherwise, and after you take the end off.null when its time is not prepaid.prepaid_until. What is held from your credits for the run now, in cents. null when prepaid_until is.The new time is billed by the hour. 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 hour: 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
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
Body
Not a choice: a computer with an end is deleted when its time is up, running or not, with everything on it. "delete" is accepted and changes nothing. Sent alone, it needs a computer that has an end and answers with the end fields as they are; for a computer with no end it returns 400 (INVALID_ENDS). Omitted or null is not sent. Any other value, "stop" included, returns 400 (INVALID_ENDS): A computer with an end is deleted when its time is up. To keep a computer, leave out the end.
delete, 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.
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.
Present alongside ends_at. What happens at the end, read only: "delete" (deleted at ends_at, as every end set now is), "stop" (an end set before every end deleted the computer: stopped at ends_at, deleted 7 days later unless it is started), or null with no end.
delete, stop, null Present when the end was set but its time was not prepaid: The new time is billed by the hour. 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 hour: your credit does not cover prepaying all of it. when the credit is short.