Skip to content
arvm
Docs menu

API reference

This reference is generated from the OpenAPI document. API conventions explains what every operation shares: auth, IDs, lists, errors and idempotency.

Page What it covers
auth Sign in by emailed code or GitHub, sign out, and sign the CLI in from a browser.
account The signed-in user and their org.
catalog The sizes, regions, images and plans available on the platform.
machines Machines and everything done to one, including exec, files, the terminal, endpoints and usage.
snapshots Saved copies of a machine’s disk. A paid add-on, billed per GiB-month from the same balance.
ssh-keys The org’s SSH public keys. Any of them signs in to any of the org’s machines through the gateway.
api-keys Keys for programs. The secret is shown once, when the key is created.
billing The plan, the prepaid balance, and what was used.
Schemas The shape of every request and response body.

Every operation

Operation Request Operation ID
Email a sign-in code POST /v1/auth/email/start startEmailLogin
Exchange an emailed code for a session POST /v1/auth/email/verify verifyEmailLogin
Start GitHub sign-in GET /v1/auth/github/start startGithubLogin
Finish GitHub sign-in GET /v1/auth/github/callback completeGithubLogin
End the session POST /v1/auth/logout logout
Start signing the CLI in POST /v1/auth/device/start startDeviceLogin
Poll for the CLI’s API key POST /v1/auth/device/token pollDeviceLogin
Approve a CLI sign-in from the browser POST /v1/auth/device/approve approveDeviceLogin
Who is signed in GET /v1/me getMe
Get the org GET /v1/org getOrg
Rename the org PATCH /v1/org updateOrg
Submit product feedback POST /v1/feedback submitFeedback
List sizes GET /v1/sizes listSizes
List regions GET /v1/regions listRegions
List images GET /v1/images listImages
List plans GET /v1/plans listPlans
Create a machine POST /v1/machines createMachine
List machines GET /v1/machines listMachines
Get a machine GET /v1/machines/{machine} getMachine
Change a machine PATCH /v1/machines/{machine} updateMachine
Delete a machine DELETE /v1/machines/{machine} deleteMachine
Start a machine POST /v1/machines/{machine}/start startMachine
Stop a machine POST /v1/machines/{machine}/stop stopMachine
Restart a machine POST /v1/machines/{machine}/restart restartMachine
List or follow a machine’s events GET /v1/machines/{machine}/events listMachineEvents
Get a machine’s metrics GET /v1/machines/{machine}/metrics getMachineMetrics
Run a command in a machine POST /v1/machines/{machine}/exec execMachine
Read a file GET /v1/machines/{machine}/files readMachineFile
Write a file PUT /v1/machines/{machine}/files writeMachineFile
Delete a file or directory DELETE /v1/machines/{machine}/files deleteMachineFile
List a directory GET /v1/machines/{machine}/files/list listMachineFiles
Open a terminal GET /v1/machines/{machine}/terminal openMachineTerminal
List a machine’s endpoints GET /v1/machines/{machine}/endpoints listMachineEndpoints
Expose a port PUT /v1/machines/{machine}/endpoints/{port} putMachineEndpoint
Stop exposing a port DELETE /v1/machines/{machine}/endpoints/{port} deleteMachineEndpoint
Get what a machine used GET /v1/machines/{machine}/usage getMachineUsage
Snapshot a machine’s disk POST /v1/snapshots createSnapshot
List snapshots GET /v1/snapshots listSnapshots
Get a snapshot GET /v1/snapshots/{snapshot} getSnapshot
Delete a snapshot DELETE /v1/snapshots/{snapshot} deleteSnapshot
Add an SSH public key POST /v1/ssh-keys createSshKey
List SSH keys GET /v1/ssh-keys listSshKeys
Remove an SSH key DELETE /v1/ssh-keys/{ssh_key} deleteSshKey
Create an API key POST /v1/api-keys createApiKey
List API keys GET /v1/api-keys listApiKeys
Revoke an API key DELETE /v1/api-keys/{api_key} deleteApiKey
Get the plan and the balance GET /v1/billing getBilling
Claim the free trial POST /v1/trial/claim claimTrial
Start the subscription checkout POST /v1/billing/checkout startCheckout
Start a top-up POST /v1/billing/top-ups startTopUp
Show auto top-up GET /v1/billing/auto-top-up getAutoTopUp
Turn auto top-up on, or change it PUT /v1/billing/auto-top-up setAutoTopUp
Turn auto top-up off DELETE /v1/billing/auto-top-up turnOffAutoTopUp
Open the Stripe customer portal POST /v1/billing/portal openBillingPortal
List ledger entries GET /v1/billing/ledger listLedgerEntries
List usage by day GET /v1/billing/usage listUsage

Error responses

Every error has a Problem body. Switch on its code, never on its text. The table shows the example that each shared response carries in the OpenAPI document. One status can carry other codes, and the description of each operation names them.

Status Example code Meaning
400 invalid_request The request is malformed or a field is not valid. errors names each field.
401 unauthenticated No API key or session, or it is not valid any more.
402 insufficient_balance The org’s balance does not cover this (insufficient_balance), or its subscription ended (subscription_required).
403 limit_exceeded The caller is known but may not do this, for example because a plan limit is reached, the org is suspended, or the API key is read-only and the operation needs a full one (read_only_key).
404 not_found There is no such resource in the caller’s org.
409 machine_not_running The request cannot be applied to the resource as it is now.
411 length_required The request streams a body of unknown length, where the operation needs its Content-Length.
413 payload_too_large The request body exceeds the maximum byte size allowed for this operation.
429 rate_limited The rate limit for this API key, session or address is used up.
503 no_capacity The platform cannot do this right now, for example because no host has room, the machine’s host does not answer, or the machine’s disk cannot be reached.
500 internal Any other error. A 5xx is the platform’s fault and is safe to retry with the same Idempotency-Key, except for an exec. There only the API’s own problem document says that nothing ran, and exec_outcome_unknown (502) says that the command may have run. An answer to an exec that the API did not write (a 502 or 504 from a proxy or the gateway, whose body is not a problem document), or a connection that ends with no answer, says nothing about the command, so treat it as exec_outcome_unknown.