{"openapi":"3.0.0","info":{"title":"briq API","version":"0.0.0","description":"Services for AI agents."},"servers":[{"url":"https://api.briq.cloud"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"bq_live_…"}},"schemas":{"KeyPolicy":{"type":"object","properties":{"maxConcurrentBriqs":{"type":"integer","minimum":0,"default":5},"dailySpendCapCents":{"type":"integer","minimum":0,"default":1000},"allowedSizes":{"type":"array","items":{"type":"string","enum":["nano","small","medium","large"]},"default":["nano","small","medium"]},"allowedRegistries":{"type":"array","items":{"type":"string"},"default":["docker.io","ghcr.io","quay.io"]},"maxSleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","default":"never","description":"The longest sleep this credential may give a briq, \"never\" included (\"never\": no bound of its own; the environment and the plan still apply)"},"expiresAt":{"type":"string","nullable":true,"format":"date-time","default":null}}},"Briq":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"stackId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"image":{"type":"string","minLength":3,"maxLength":255,"pattern":"^[a-z0-9][a-z0-9._\\/-]*(?::[\\w.-]+)?(?:@sha256:[a-f0-9]{64})?$"},"size":{"type":"string","enum":["nano","small","medium","large"]},"state":{"type":"string","enum":["creating","running","stopping","stopped","sleeping","starting","destroying","destroyed","error"]},"internalHost":{"type":"string","description":"Its address on the team's private network"},"endpoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"port":{"type":"integer"},"protocol":{"type":"string","enum":["http","postgres","mysql","redis","mongodb","amqp","bolt","grpc"],"default":"http","description":"http: a URL; a database protocol (postgres, mysql, redis, mongodb, amqp, bolt, grpc): a TCP endpoint, reachable from outside over TLS, url is its address without the password"},"mode":{"type":"string","enum":["public","private"],"description":"public: anyone can open the URL; private: only whoever has the URL, which carries a secret checked before a request reaches the briq"},"url":{"type":"string","format":"uri"}},"required":["id","port","mode","url"]},"description":"Its URL, once published (one at most), and its TCP endpoint, once published"},"ports":{"type":"array","items":{"type":"integer"},"default":[]},"databasePorts":{"type":"array","items":{"type":"object","properties":{"port":{"type":"integer"},"protocol":{"type":"string","enum":["http","postgres","mysql","redis","mongodb","amqp","bolt","grpc"]}},"required":["port","protocol"]},"default":[],"description":"Its recipe's database ports: briq_expose one with its protocol for a TCP endpoint"},"expose":{"type":"integer","nullable":true,"default":null},"env":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":32768},{"type":"object","properties":{"secret":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_.-]*$"},"value":{"type":"string","maxLength":32768}},"required":["secret"]}]},"default":{},"description":"As declared: plain values, and { secret: NAME } for secrets, whose values never appear"},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"type":"string","nullable":true,"format":"date-time","description":"When its current run started (its last run, while it is not running)"},"sleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","description":"When the briq goes to sleep: after this long without use (agent calls, visits to its stack's URLs). A string: \"30m\", \"3h\", \"7d\" or \"never\", never a number. A sleeping briq keeps its disk, costs nothing for compute, and the next use wakes it. \"never\" keeps it always on (Pro plan and above)"},"sleepsAt":{"type":"string","nullable":true,"format":"date-time","description":"When it goes to sleep unless it is used before then: every use moves this later. Null when it is not running or never sleeps"},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"},"costCentsSoFar":{"type":"number","description":"Euro cents billed so far, fractions of a cent included"},"error":{"type":"string","nullable":true},"destroysAt":{"type":"string","nullable":true,"format":"date-time","default":null,"description":"When a briq in error is destroyed automatically; null in any other state"},"stoppedReason":{"type":"string","nullable":true,"enum":["idle","cap","credits","user","provider","exited"],"default":null,"description":"Why it is stopped or sleeping. idle and provider: asleep, the next call or visit wakes it. cap and credits: a limit, asleep again once it has cleared. user and exited: only briq_start runs it again"},"lastExit":{"type":"object","nullable":true,"properties":{"code":{"type":"integer"},"oomKilled":{"type":"boolean"},"at":{"type":"string","format":"date-time"}},"default":null,"required":["code","oomKilled","at"],"description":"The last time its process ended on its own: exit code (128 + n for signal n), whether it ran out of memory, and when"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"integer"}},"required":["path","bytes"]},"default":[],"description":"Its boot files, by path and size; their content is not returned"},"forkedFrom":{"type":"string","nullable":true,"default":null}},"required":["id","teamId","stackId","name","image","size","state","internalHost","endpoints","createdAt","startedAt","sleep","sleepsAt","lastUsedAt","costCentsSoFar","error"]},"RunResult":{"type":"object","properties":{"briqs":{"type":"array","items":{"$ref":"#/components/schemas/Briq"}},"outputs":{"type":"object","additionalProperties":{"type":"string"},"default":{},"description":"A recipe's connection strings, the secrets briq generated (never ones you passed in), and URL when published"},"recipe":{"type":"string","nullable":true},"costLine":{"type":"string"}},"required":["briqs","recipe","costLine"]},"BriqSpec":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"image":{"type":"string","minLength":3,"maxLength":255,"pattern":"^[a-z0-9][a-z0-9._\\/-]*(?::[\\w.-]+)?(?:@sha256:[a-f0-9]{64})?$"},"cmd":{"type":"array","items":{"type":"string","maxLength":8192},"maxItems":64},"entrypoint":{"type":"array","items":{"type":"string","maxLength":8192},"maxItems":64},"env":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":32768},{"type":"object","properties":{"secret":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_.-]*$"},"value":{"type":"string","maxLength":32768}},"required":["secret"]}]},"default":{},"description":"A string; { secret: NAME } for a value briq generates; { secret: NAME, value } for a credential you have, stored encrypted and never returned. Plain values are shown in status. {{briq:NAME}} in a plain value becomes the address of briq NAME in the stack; {{self:host}}, the hostname of its own URL when it is published as it is created (localhost without one)"},"ports":{"type":"array","items":{"type":"integer","minimum":1,"maximum":65535},"maxItems":32,"default":[],"description":"The ports the image listens on"},"size":{"type":"string","enum":["nano","small","medium","large"],"default":"small"},"volume":{"type":"object","properties":{"mount":{"type":"string","maxLength":255},"gb":{"type":"integer","minimum":1,"maximum":500,"default":2}},"required":["mount"]},"files":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"base64":{"type":"string"}},"required":["base64"]}]},"description":"Boot files, absolute path → text or { base64 }: written before the process starts and again whenever it starts over. At most 64 files and 256 KB in all"},"healthcheck":{"type":"object","properties":{"cmd":{"type":"array","items":{"type":"string","maxLength":8192},"minItems":1,"maxItems":64},"intervalMs":{"type":"integer","minimum":500,"default":2000},"timeoutMs":{"type":"integer","minimum":1000,"maximum":300000,"default":60000}},"required":["cmd"]},"sleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","description":"When the briq goes to sleep: after this long without use (agent calls, visits to its stack's URLs). A string: \"30m\", \"3h\", \"7d\" or \"never\", never a number. A sleeping briq keeps its disk, costs nothing for compute, and the next use wakes it. \"never\" keeps it always on (Pro plan and above)"},"expose":{"type":"integer","minimum":1,"maximum":65535,"description":"The port a public URL delivers to, when the briq has several: its front door. Declaring it publishes nothing"}},"required":["name","image"]},"RunBody":{"anyOf":[{"type":"object","properties":{"spec":{"$ref":"#/components/schemas/BriqSpec"},"stack":{"type":"string"},"expose":{"type":"string","enum":["public","private"],"description":"Publish it as it is created: \"private\" for only whoever has the URL (it carries a secret), \"public\" for anyone. Left out, nothing is published. The URL comes back as outputs.URL. The port is spec.expose, or the only one in spec.ports"},"wait":{"type":"boolean","default":true,"description":"Answer once the briqs are ready (healthcheck passed, or process started)"},"waitTimeoutMs":{"type":"integer","maximum":300000,"default":120000,"description":"How long to wait; a briq still creating then is on its way"}},"required":["spec"]},{"type":"object","properties":{"recipe":{"type":"string"},"params":{"type":"object","additionalProperties":{"nullable":true},"description":"The recipe's params (GET /v1/recipes/{name} lists them). A language recipe takes your code here: { files, env }"},"name":{"type":"string"},"stack":{"type":"string"},"expose":{"type":"string","enum":["public","private"],"description":"Publish the recipe's front door as it is created: \"private\" for only whoever has the URL (it carries a secret), \"public\" for anyone. Left out, nothing is published. The URL comes back as outputs.URL. A recipe with no front door (a database) refuses it"},"sleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","description":"When the briq goes to sleep: after this long without use (agent calls, visits to its stack's URLs). A string: \"30m\", \"3h\", \"7d\" or \"never\", never a number. A sleeping briq keeps its disk, costs nothing for compute, and the next use wakes it. \"never\" keeps it always on (Pro plan and above). One window for every briq the recipe makes; left out, the environment's default"},"wait":{"type":"boolean","default":true,"description":"Answer once the briqs are ready (healthcheck passed, or process started)"},"waitTimeoutMs":{"type":"integer","maximum":300000,"default":120000,"description":"How long to wait; a briq still creating then is on its way"}},"required":["recipe"]}]},"SleepBody":{"type":"object","properties":{"sleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","description":"When the briq goes to sleep: after this long without use (agent calls, visits to its stack's URLs). A string: \"30m\", \"3h\", \"7d\" or \"never\", never a number. A sleeping briq keeps its disk, costs nothing for compute, and the next use wakes it. \"never\" keeps it always on (Pro plan and above)"},"stack":{"type":"boolean","default":false,"description":"true: give the same sleep to every briq of its stack, which sleeps and wakes together"}},"required":["sleep"]},"ForkResult":{"type":"object","properties":{"briqs":{"type":"array","items":{"$ref":"#/components/schemas/Briq"}},"copied":{"type":"object","additionalProperties":{"type":"string","enum":["memory","disk","config"]}},"outputs":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"stack":{"type":"string"},"skipped":{"type":"array","items":{"type":"string"},"default":[]},"costLine":{"type":"string"}},"required":["briqs","copied","stack","costLine"]},"ForkBody":{"type":"object","properties":{"name":{"type":"string"},"stack":{"type":"string"},"sleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","description":"When the briq goes to sleep: after this long without use (agent calls, visits to its stack's URLs). A string: \"30m\", \"3h\", \"7d\" or \"never\", never a number. A sleeping briq keeps its disk, costs nothing for compute, and the next use wakes it. \"never\" keeps it always on (Pro plan and above). Left out, the source's. A window longer than this key allows is refused"},"wait":{"type":"boolean","default":true},"waitTimeoutMs":{"type":"integer","maximum":300000,"default":120000}}},"StackForkBody":{"type":"object","properties":{"into":{"type":"string"},"sleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","description":"When the briq goes to sleep: after this long without use (agent calls, visits to its stack's URLs). A string: \"30m\", \"3h\", \"7d\" or \"never\", never a number. A sleeping briq keeps its disk, costs nothing for compute, and the next use wakes it. \"never\" keeps it always on (Pro plan and above). Left out, the source's. A window longer than this key allows is refused"},"wait":{"type":"boolean","default":true},"waitTimeoutMs":{"type":"integer","maximum":300000,"default":120000}}},"RecipeParam":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"options":{"type":"array","nullable":true,"items":{"type":"string"},"description":"The allowed values, for an enum"},"defaultValue":{"type":"string","nullable":true,"description":"JSON of the default, when there is one"},"required":{"type":"boolean"},"description":{"type":"string","nullable":true},"format":{"type":"string","nullable":true,"description":"The shape of a record or object value, e.g. `{ url, ref?, dir?, token? }`"}},"required":["name","type","options","defaultValue","required","description"]}},"parameters":{}},"paths":{"/v1/auth/providers":{"get":{"tags":["account"],"summary":"Social sign-in providers this deployment offers","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"string","enum":["google","github"]}}},"required":["providers"]}}}}}}},"/v1/me":{"get":{"tags":["account"],"summary":"Current user and teams","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"emailVerified":{"type":"boolean"},"admin":{"type":"boolean"}},"required":["id","email","name","emailVerified","admin"]},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"personal":{"type":"boolean"},"plan":{"type":"string","enum":["hobby","pro","team"]},"region":{"type":"string"},"currency":{"type":"string","enum":["eur","usd"]},"role":{"type":"string"},"creditBalanceCents":{"type":"number"},"paysAsItGoes":{"type":"boolean"}},"required":["id","slug","name","personal","plan","region","currency","role","creditBalanceCents","paysAsItGoes"]}},"currentTeamId":{"type":"string"},"regions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["paris","virginia","singapore"]},"label":{"type":"string"},"country":{"type":"string"},"zone":{"type":"string"},"eu":{"type":"boolean"}},"required":["id","label","country","zone","eu"]}},"freeCreditsOnVerifyCents":{"type":"number"},"apiUrl":{"type":"string"},"payments":{"type":"boolean"},"maxSleep":{"type":"string"}},"required":["user","teams","currentTeamId","regions","freeCreditsOnVerifyCents","apiUrl","payments","maxSleep"]}}}},"401":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"patch":{"tags":["account"],"summary":"Update the current user (name)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80}},"required":["name"]}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/teams":{"post":{"tags":["account"],"summary":"Create a team","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"region":{"type":"string","enum":["paris","virginia","singapore"]},"currency":{"type":"string","enum":["eur","usd"]}},"required":["name"]}}}},"responses":{"201":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"personal":{"type":"boolean"},"plan":{"type":"string","enum":["hobby","pro","team"]},"region":{"type":"string"},"currency":{"type":"string","enum":["eur","usd"]},"role":{"type":"string"},"creditBalanceCents":{"type":"number"},"paysAsItGoes":{"type":"boolean"}},"required":["id","slug","name","personal","plan","region","currency","role","creditBalanceCents","paysAsItGoes"]}},"required":["team"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/teams/{id}":{"patch":{"tags":["account"],"summary":"Rename a team, change the region new briqs run in, or the display currency","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"region":{"type":"string","enum":["paris","virginia","singapore"]},"currency":{"type":"string","enum":["eur","usd"]}}}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"personal":{"type":"boolean"},"plan":{"type":"string","enum":["hobby","pro","team"]},"region":{"type":"string"},"currency":{"type":"string","enum":["eur","usd"]},"role":{"type":"string"},"creditBalanceCents":{"type":"number"},"paysAsItGoes":{"type":"boolean"}},"required":["id","slug","name","personal","plan","region","currency","role","creditBalanceCents","paysAsItGoes"]}},"required":["team"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"tags":["account"],"summary":"Delete a team (owner; not personal; no live briqs)","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/teams/{id}/members":{"get":{"tags":["account"],"summary":"Members and pending invitations","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"type":"string","format":"date-time"}},"required":["userId","name","email","role","joinedAt"]}},"invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"invitedBy":{"type":"string","nullable":true},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","email","role","invitedBy","expiresAt","createdAt"]}}},"required":["members","invites"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/teams/{id}/members/{userId}":{"patch":{"tags":["account"],"summary":"Change a member role (owner)","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"]}},"required":["role"]}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"tags":["account"],"summary":"Remove a member, or leave (your own id). Returns the live keys they created, for the team to review: keys are the team’s and stay.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"keysToReview":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"}},"required":["id","name","prefix"]}}},"required":["ok","keysToReview"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/teams/{id}/invites":{"post":{"tags":["account"],"summary":"Invite someone by email (owner or admin)","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"role":{"type":"string","enum":["admin","member"],"default":"member"}},"required":["email"]}}}},"responses":{"201":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"invite":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"invitedBy":{"type":"string","nullable":true},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","email","role","invitedBy","expiresAt","createdAt"]}},"required":["invite"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/teams/{id}/invites/{inviteId}":{"delete":{"tags":["account"],"summary":"Revoke a pending invitation","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"inviteId","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/invites/{token}":{"get":{"tags":["account"],"summary":"Look up an invitation by its link token (no auth)","parameters":[{"schema":{"type":"string"},"required":true,"name":"token","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string"},"teamName":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"inviterName":{"type":"string","nullable":true},"expiresAt":{"type":"string"},"expired":{"type":"boolean"}},"required":["teamId","teamName","email","role","inviterName","expiresAt","expired"]}}}},"404":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/invites/{token}/accept":{"post":{"tags":["account"],"summary":"Join the team an invitation is for (signed in as the invited address)","parameters":[{"schema":{"type":"string"},"required":true,"name":"token","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"personal":{"type":"boolean"},"plan":{"type":"string","enum":["hobby","pro","team"]},"region":{"type":"string"},"currency":{"type":"string","enum":["eur","usd"]},"role":{"type":"string"},"creditBalanceCents":{"type":"number"},"paysAsItGoes":{"type":"boolean"}},"required":["id","slug","name","personal","plan","region","currency","role","creditBalanceCents","paysAsItGoes"]}},"required":["team"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/agents":{"get":{"tags":["account"],"security":[{"bearer":[]}],"summary":"Keys and connected MCP clients of the team","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["key","oauth"]},"name":{"type":"string"},"prefix":{"type":"string","nullable":true},"policy":{"type":"object","properties":{"maxConcurrentBriqs":{"type":"integer","minimum":0,"default":5},"dailySpendCapCents":{"type":"integer","minimum":0,"default":1000},"allowedSizes":{"type":"array","items":{"type":"string","enum":["nano","small","medium","large"]},"default":["nano","small","medium"]},"allowedRegistries":{"type":"array","items":{"type":"string"},"default":["docker.io","ghcr.io","quay.io"]},"maxSleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","default":"never","description":"The longest sleep this credential may give a briq, \"never\" included (\"never\": no bound of its own; the environment and the plan still apply)"},"expiresAt":{"type":"string","nullable":true,"format":"date-time","default":null}}},"client":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"uri":{"type":"string","nullable":true},"icon":{"type":"string","nullable":true}},"required":["id","name","uri","icon"]},"agent":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"title":{"type":"string"},"version":{"type":"string","nullable":true},"userAgent":{"type":"string","nullable":true}},"required":["name","title","version","userAgent"]},"createdBy":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["name","email"]},"createdAt":{"type":"string"},"connectedAt":{"type":"string","nullable":true},"lastUsedAt":{"type":"string","nullable":true},"revokedAt":{"type":"string","nullable":true}},"required":["id","kind","name","prefix","policy","client","agent","createdBy","createdAt","connectedAt","lastUsedAt","revokedAt"]}},"seats":{"type":"object","properties":{"used":{"type":"integer"},"max":{"type":"integer"}},"required":["used","max"]}},"required":["agents","seats"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/agents/{id}":{"patch":{"tags":["account"],"security":[{"bearer":[]}],"summary":"Rename an agent or change its policy. Session only.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"policy":{"$ref":"#/components/schemas/KeyPolicy"}}}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["key","oauth"]},"name":{"type":"string"},"prefix":{"type":"string","nullable":true},"policy":{"type":"object","properties":{"maxConcurrentBriqs":{"type":"integer","minimum":0,"default":5},"dailySpendCapCents":{"type":"integer","minimum":0,"default":1000},"allowedSizes":{"type":"array","items":{"type":"string","enum":["nano","small","medium","large"]},"default":["nano","small","medium"]},"allowedRegistries":{"type":"array","items":{"type":"string"},"default":["docker.io","ghcr.io","quay.io"]},"maxSleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","default":"never","description":"The longest sleep this credential may give a briq, \"never\" included (\"never\": no bound of its own; the environment and the plan still apply)"},"expiresAt":{"type":"string","nullable":true,"format":"date-time","default":null}}},"client":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"uri":{"type":"string","nullable":true},"icon":{"type":"string","nullable":true}},"required":["id","name","uri","icon"]},"agent":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"title":{"type":"string"},"version":{"type":"string","nullable":true},"userAgent":{"type":"string","nullable":true}},"required":["name","title","version","userAgent"]},"createdBy":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["name","email"]},"createdAt":{"type":"string"},"connectedAt":{"type":"string","nullable":true},"lastUsedAt":{"type":"string","nullable":true},"revokedAt":{"type":"string","nullable":true}},"required":["id","kind","name","prefix","policy","client","agent","createdBy","createdAt","connectedAt","lastUsedAt","revokedAt"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"tags":["account"],"security":[{"bearer":[]}],"summary":"Revoke an agent: a key stops working, a connected client loses its tokens. Session only.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/connect/client":{"get":{"tags":["account"],"summary":"The MCP client asking to connect, as the consent page shows it","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":2048},"required":true,"name":"client_id","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string"},"name":{"type":"string"},"uri":{"type":"string","nullable":true},"icon":{"type":"string","nullable":true},"verifiedDomain":{"type":"string","nullable":true},"redirectHosts":{"type":"array","items":{"type":"string"}},"local":{"type":"boolean"},"defaultPolicy":{"type":"object","properties":{"maxConcurrentBriqs":{"type":"integer","minimum":0,"default":5},"dailySpendCapCents":{"type":"integer","minimum":0,"default":1000},"allowedSizes":{"type":"array","items":{"type":"string","enum":["nano","small","medium","large"]},"default":["nano","small","medium"]},"allowedRegistries":{"type":"array","items":{"type":"string"},"default":["docker.io","ghcr.io","quay.io"]},"maxSleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","default":"never","description":"The longest sleep this credential may give a briq, \"never\" included (\"never\": no bound of its own; the environment and the plan still apply)"},"expiresAt":{"type":"string","nullable":true,"format":"date-time","default":null}}}},"required":["clientId","name","uri","icon","verifiedDomain","redirectHosts","local","defaultPolicy"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/connect":{"post":{"tags":["account"],"summary":"Approve an MCP client for a team with a policy. The page then accepts the OAuth consent, which binds the client to this grant.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":2048},"teamId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":80},"policy":{"$ref":"#/components/schemas/KeyPolicy"}},"required":["clientId","teamId"]}}}},"responses":{"201":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"policy":{"type":"object","properties":{"maxConcurrentBriqs":{"type":"integer","minimum":0,"default":5},"dailySpendCapCents":{"type":"integer","minimum":0,"default":1000},"allowedSizes":{"type":"array","items":{"type":"string","enum":["nano","small","medium","large"]},"default":["nano","small","medium"]},"allowedRegistries":{"type":"array","items":{"type":"string"},"default":["docker.io","ghcr.io","quay.io"]},"maxSleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","default":"never","description":"The longest sleep this credential may give a briq, \"never\" included (\"never\": no bound of its own; the environment and the plan still apply)"},"expiresAt":{"type":"string","nullable":true,"format":"date-time","default":null}}}},"required":["id","teamId","policy"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/connect/device":{"get":{"tags":["account"],"summary":"The device code an agent showed you, and the client it was issued to","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":32},"required":true,"name":"user_code","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"userCode":{"type":"string"},"expiresAt":{"type":"string"},"client":{"type":"object","properties":{"clientId":{"type":"string"},"name":{"type":"string"},"uri":{"type":"string","nullable":true},"icon":{"type":"string","nullable":true},"verifiedDomain":{"type":"string","nullable":true},"redirectHosts":{"type":"array","items":{"type":"string"}},"local":{"type":"boolean"}},"required":["clientId","name","uri","icon","verifiedDomain","redirectHosts","local"]},"defaultPolicy":{"type":"object","properties":{"maxConcurrentBriqs":{"type":"integer","minimum":0,"default":5},"dailySpendCapCents":{"type":"integer","minimum":0,"default":1000},"allowedSizes":{"type":"array","items":{"type":"string","enum":["nano","small","medium","large"]},"default":["nano","small","medium"]},"allowedRegistries":{"type":"array","items":{"type":"string"},"default":["docker.io","ghcr.io","quay.io"]},"maxSleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","default":"never","description":"The longest sleep this credential may give a briq, \"never\" included (\"never\": no bound of its own; the environment and the plan still apply)"},"expiresAt":{"type":"string","nullable":true,"format":"date-time","default":null}}}},"required":["userCode","expiresAt","client","defaultPolicy"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"tags":["account"],"summary":"Approve a device code for a team with a policy. The agent polling for it then gets tokens bound to this grant.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userCode":{"type":"string","minLength":1,"maxLength":32},"teamId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":80},"policy":{"$ref":"#/components/schemas/KeyPolicy"}},"required":["userCode","teamId"]}}}},"responses":{"201":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"policy":{"type":"object","properties":{"maxConcurrentBriqs":{"type":"integer","minimum":0,"default":5},"dailySpendCapCents":{"type":"integer","minimum":0,"default":1000},"allowedSizes":{"type":"array","items":{"type":"string","enum":["nano","small","medium","large"]},"default":["nano","small","medium"]},"allowedRegistries":{"type":"array","items":{"type":"string"},"default":["docker.io","ghcr.io","quay.io"]},"maxSleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","default":"never","description":"The longest sleep this credential may give a briq, \"never\" included (\"never\": no bound of its own; the environment and the plan still apply)"},"expiresAt":{"type":"string","nullable":true,"format":"date-time","default":null}}}},"required":["id","teamId","policy"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/connect/device/deny":{"post":{"tags":["account"],"summary":"Refuse a device code: the agent polling for it gets access_denied","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userCode":{"type":"string","minLength":1,"maxLength":32}},"required":["userCode"]}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing":{"get":{"tags":["billing"],"summary":"The team's plan, subscription and payment options","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"plan":{"type":"string","enum":["hobby","pro","team"]},"status":{"type":"string","nullable":true},"renewsAt":{"type":"string","nullable":true,"format":"date-time"},"change":{"type":"object","nullable":true,"properties":{"plan":{"type":"string","enum":["hobby","pro","team"]},"at":{"type":"string","format":"date-time"}},"required":["plan","at"]},"customer":{"type":"boolean"},"canManage":{"type":"boolean"},"payg":{"type":"object","nullable":true,"properties":{"card":{"type":"string"},"owedCents":{"type":"number"},"pendingCents":{"type":"number"},"suspended":{"type":"boolean"}},"required":["card","owedCents","pendingCents","suspended"]},"included":{"type":"object","nullable":true,"properties":{"cents":{"type":"number"},"usedCents":{"type":"number"},"spentCents":{"type":"number"},"periodEnd":{"type":"string","format":"date-time"}},"required":["cents","usedCents","spentCents","periodEnd"]}},"required":["enabled","plan","status","renewsAt","change","customer","canManage","payg","included"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"payment provider error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Subscribe to a plan (a Checkout), or change or cancel the subscription (the portal)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["hobby","pro","team"]}},"required":["plan"]}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"]},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"payment provider error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/topup":{"post":{"tags":["billing"],"summary":"A Checkout to buy credits (euro cents, before tax)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cents":{"type":"integer","minimum":1000,"maximum":100000}},"required":["cents"]}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"payment provider error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/card":{"post":{"tags":["billing"],"summary":"A Checkout to save a card: pay as you go, charged past the credits","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"payment provider error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/checkout/{id}":{"get":{"tags":["billing"],"summary":"A Checkout of the team, for the payment page: Stripe's form and what it pays for","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["topup","plan","card"]},"status":{"type":"string","enum":["open","complete","expired"]},"clientSecret":{"type":"string"},"publishableKey":{"type":"string"},"plan":{"type":"string","nullable":true,"enum":["hobby","pro","team"]},"cents":{"type":"number","nullable":true},"country":{"type":"string","nullable":true},"taxId":{"type":"object","nullable":true,"properties":{"type":{"type":"string"},"value":{"type":"string"}},"required":["type","value"]},"businessName":{"type":"string","nullable":true}},"required":["id","kind","status","clientSecret","publishableKey","plan","cents","country","taxId","businessName"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"payment provider error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/checkout/{id}/prepare":{"post":{"tags":["billing"],"summary":"Who is buying, just before paying: sets the invoice's VAT mention","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"country":{"type":"string","minLength":2,"maxLength":2},"business":{"type":"boolean"},"businessName":{"type":"string","maxLength":150},"taxIdType":{"type":"string","maxLength":20}},"required":["country","business"]}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"vat":{"type":"string","nullable":true}},"required":["vat"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"payment provider error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/portal":{"post":{"tags":["billing"],"summary":"Stripe's billing portal: invoices, payment method, billing details","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"payment provider error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/sync":{"post":{"tags":["billing"],"summary":"Apply a finished Checkout now, without waiting for the webhook","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string"}}}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"billing":{"type":"object","properties":{"enabled":{"type":"boolean"},"plan":{"type":"string","enum":["hobby","pro","team"]},"status":{"type":"string","nullable":true},"renewsAt":{"type":"string","nullable":true,"format":"date-time"},"change":{"type":"object","nullable":true,"properties":{"plan":{"type":"string","enum":["hobby","pro","team"]},"at":{"type":"string","format":"date-time"}},"required":["plan","at"]},"customer":{"type":"boolean"},"canManage":{"type":"boolean"},"payg":{"type":"object","nullable":true,"properties":{"card":{"type":"string"},"owedCents":{"type":"number"},"pendingCents":{"type":"number"},"suspended":{"type":"boolean"}},"required":["card","owedCents","pendingCents","suspended"]},"included":{"type":"object","nullable":true,"properties":{"cents":{"type":"number"},"usedCents":{"type":"number"},"spentCents":{"type":"number"},"periodEnd":{"type":"string","format":"date-time"}},"required":["cents","usedCents","spentCents","periodEnd"]}},"required":["enabled","plan","status","renewsAt","change","customer","canManage","payg","included"]},"creditedCents":{"type":"number"}},"required":["billing","creditedCents"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"payment provider error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/support":{"post":{"tags":["support"],"summary":"Write to the briq team","description":"A question, a bug or an idea, emailed to the people who build briq. Signed in, the answer goes to the account’s address. With a key or an agent’s token, it goes to the person who connected the agent (or the team’s owner), who gets a copy, and the team’s audit log records it. Otherwise give `email` to get one. Five messages per ten minutes.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"type":"string","enum":["question","bug","idea"],"default":"question"},"message":{"type":"string","minLength":1,"maxLength":5000},"email":{"type":"string","maxLength":254,"format":"email"},"page":{"type":"string","maxLength":500},"client":{"type":"object","properties":{"viewport":{"type":"string","maxLength":40},"timeZone":{"type":"string","maxLength":60},"language":{"type":"string","maxLength":40}}},"website":{"type":"string","maxLength":500}},"required":["message"]}}}},"responses":{"202":{"description":"sent","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"replyTo":{"type":"string","nullable":true},"receipt":{"type":"boolean"},"requestId":{"type":"string"}},"required":["ok","replyTo","receipt","requestId"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/briqs":{"post":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Run a briq from an image spec or a recipe","description":"Creates the briqs and answers once they are ready (healthcheck passed, or process started), for up to `waitTimeoutMs`, unless `wait: false`. A briq still `creating` then is on its way. `expose` publishes as it creates, the URL in `outputs.URL`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunBody"}}}},"responses":{"201":{"description":"created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunResult"}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"List briqs","parameters":[{"schema":{"type":"string"},"required":false,"name":"stack","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"all","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"briqs":{"type":"array","items":{"$ref":"#/components/schemas/Briq"}},"costLine":{"type":"string"}},"required":["briqs","costLine"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/briqs/{id}":{"get":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Briq status","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"briq":{"$ref":"#/components/schemas/Briq"},"costLine":{"type":"string"}},"required":["briq","costLine"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Destroy a briq","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"briq":{"$ref":"#/components/schemas/Briq"}},"required":["briq"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/briqs/{id}/exec":{"post":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Run a command inside a briq","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cmd":{"type":"array","items":{"type":"string","maxLength":65536},"minItems":1,"maxItems":256,"description":"argv, run without a shell: [\"sh\", \"-c\", \"…\"] for pipes, globs or $VARS"},"timeoutMs":{"type":"integer","minimum":1000,"maximum":600000,"description":"60000 by default"},"stdin":{"type":"string","maxLength":2000000,"description":"Fed to the command's standard input"}},"required":["cmd"]}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"exitCode":{"type":"number"},"timedOut":{"type":"boolean"},"costLine":{"type":"string"}},"required":["stdout","stderr","exitCode","timedOut","costLine"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/briqs/{id}/logs":{"get":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Fetch logs","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"since","in":"query"},{"schema":{"type":"integer","nullable":true,"maximum":1000},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"string"},"stream":{"type":"string","enum":["stdout","stderr"]},"line":{"type":"string"},"level":{"type":"string"}},"required":["ts","stream","line"]}},"next":{"type":"string","nullable":true}},"required":["lines","next"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/briqs/{id}/expose":{"post":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Publish a briq on its HTTPS URL","description":"A briq has one URL, on one port. Its front door (`spec.expose`, or its only port) is published at once; another port moves the URL there and restarts the machine, which `warning` says. `mode` left out keeps the URL's mode (a first URL is public). `rotate: true` gives a private URL a new token. An undeclared port is refused once the spec declares 32.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"port":{"type":"integer","minimum":1,"maximum":65535},"protocol":{"type":"string","enum":["http","postgres","mysql","redis","mongodb","amqp","bolt","grpc"],"description":"http (default): an HTTPS URL. postgres, mysql, redis, mongodb, amqp, bolt or grpc: a TCP endpoint, reachable from outside over TLS"},"mode":{"type":"string","enum":["public","private"],"description":"Left out, the URL keeps the mode it has; a first URL is public"},"rotate":{"type":"boolean","description":"A new token for a private URL: old links and cookies stop working. Refused for a public URL"}},"required":["port"]}}}},"responses":{"201":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"port":{"type":"number"},"protocol":{"type":"string","enum":["http","postgres","mysql","redis","mongodb","amqp","bolt","grpc"],"description":"A database protocol: a TCP endpoint, reachable from outside over TLS; absent: a URL"},"mode":{"type":"string","enum":["public","private"]},"url":{"type":"string","description":"The URL to share; a private URL carries its token. A TCP endpoint: its connection string without the password"},"hostname":{"type":"string"},"connectionString":{"type":"string","description":"A TCP endpoint: the connection string, TLS required; a recipe's carries its password"},"credentials":{"type":"string","description":"What the connection string cannot carry: a user, an API key"},"warning":{"type":"string","description":"The machine restarted to deliver this port, or the URL moved here from another"}},"required":["id","port","mode","url","hostname"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/briqs/{id}/stop":{"post":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"stop a briq","description":"Keeps its disk. Billed until the machine is down. Answers once the stop lands (up to 30 s), or with `stopping`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"briq":{"$ref":"#/components/schemas/Briq"}},"required":["briq"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/briqs/{id}/start":{"post":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"start a briq","description":"The only way back for a briq stopped by a person or by its own exit, or by a limit that has not cleared yet. A sleeping briq wakes on its next call or visit without it. Runs the same command and files as before.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"briq":{"$ref":"#/components/schemas/Briq"}},"required":["briq"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/briqs/{id}/sleep":{"post":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Change when a briq goes to sleep","description":"A new sleep window (\"30m\", \"3h\", \"7d\") or \"never\" (always on, Pro and above), for the briq or its whole stack. Changing it counts as use: a running briq sleeps the window from now. A sleeping briq stays asleep until its next use.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SleepBody"}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"briqs":{"type":"array","items":{"$ref":"#/components/schemas/Briq"},"description":"The briqs changed, the one asked for first"}},"required":["briqs"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/briqs/{id}/fork":{"post":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Fork a briq: a new briq that starts from a copy of its disk","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkBody"}}}},"responses":{"201":{"description":"created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkResult"}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/briqs/{id}/files":{"post":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Write a file into a briq (base64, max 1 MB)","description":"Creates parent directories. Writing one of the briq's boot files answers with a `warning`: the spec writes it again at the next start.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"contentBase64":{"type":"string"}},"required":["path","contentBase64"]}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"number"},"sha256":{"type":"string","description":"SHA-256 of the bytes written, hex"},"verified":{"type":"boolean","description":"True when the briq computed the same SHA-256 from the file on its disk; false when its image has no sha256sum to check with"},"warning":{"type":"string","description":"Set when the path is a boot file: the spec writes it again at the next start"}},"required":["path","bytes","sha256","verified"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"put":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Write a file into a briq, the raw bytes as the body (max 1 MB)","description":"The same as `POST /briqs/{id}/files`, without JSON or base64 around the content: `curl -X PUT --data-binary @server.py \".../files?path=/app/server.py\"`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"path","in":"query"}],"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"number"},"sha256":{"type":"string","description":"SHA-256 of the bytes written, hex"},"verified":{"type":"boolean","description":"True when the briq computed the same SHA-256 from the file on its disk; false when its image has no sha256sum to check with"},"warning":{"type":"string","description":"Set when the path is a boot file: the spec writes it again at the next start"}},"required":["path","bytes","sha256","verified"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Read a file from a briq (base64)","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"path","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"contentBase64":{"type":"string"}},"required":["path","contentBase64"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/stacks":{"get":{"tags":["stacks"],"security":[{"bearer":[]}],"summary":"List stacks","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"stacks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","name","createdAt"]}}},"required":["stacks"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"tags":["stacks"],"security":[{"bearer":[]}],"summary":"Create a stack","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"201":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"stack":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","name","createdAt"]}},"required":["stack"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/stacks/{id}":{"get":{"tags":["stacks"],"security":[{"bearer":[]}],"summary":"Get a stack with its briqs","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"stack":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","name","createdAt"]},"briqs":{"type":"array","items":{"$ref":"#/components/schemas/Briq"}}},"required":["stack","briqs"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/stacks/{id}/fork":{"post":{"tags":["stacks"],"security":[{"bearer":[]}],"summary":"Fork every briq of a stack into a new stack","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackForkBody"}}}},"responses":{"201":{"description":"created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkResult"}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/pricing":{"get":{"tags":["pricing"],"summary":"Prices per size (euro cents per hour) and display exchange rates","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"billingCurrency":{"type":"string","enum":["eur"]},"sizes":{"type":"object","additionalProperties":{"type":"object","properties":{"cpus":{"type":"number"},"cpuKind":{"type":"string","enum":["shared","performance"]},"memoryMb":{"type":"number"},"centsPerHour":{"type":"number"}},"required":["cpus","cpuKind","memoryMb","centsPerHour"]}},"rates":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"rate":{"type":"number"},"asOf":{"type":"string"}},"required":["currency","rate","asOf"]}}},"required":["billingCurrency","sizes","rates"]}}}}}}},"/v1/recipes":{"get":{"tags":["recipes"],"summary":"List recipes","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"recipes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}},"required":["name","title","description","tags"]}}},"required":["recipes"]}}}}}}},"/v1/recipes/{name}":{"get":{"tags":["recipes"],"summary":"Recipe detail","parameters":[{"schema":{"type":"string"},"required":true,"name":"name","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"recipe":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"params":{"type":"object","additionalProperties":{"nullable":true},"description":"The params a run gets when it passes none: the defaults, not every param"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/RecipeParam"},"description":"Every param the recipe takes, optional ones included, with what it does"},"outputs":{"type":"array","items":{"type":"string"}},"briqs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"image":{"type":"string"},"ports":{"type":"array","items":{"type":"number"}}},"required":["name","image","ports"]}},"docs":{"type":"string","description":"The recipe's page, as `briq_docs` names it: `cookbook/<name>`"},"guides":{"type":"array","items":{"type":"string"},"description":"Guides that walk through a task with this recipe, as `briq_docs` names them"}},"required":["name","title","description","tags","params","parameters","outputs","briqs","docs","guides"]}},"required":["recipe"]}}}},"404":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/quota":{"get":{"tags":["account"],"security":[{"bearer":[]}],"summary":"What this key may still do today","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["hobby","pro","team"]},"policy":{"type":"object","properties":{"maxConcurrentBriqs":{"type":"integer","minimum":0,"default":5},"dailySpendCapCents":{"type":"integer","minimum":0,"default":1000},"allowedSizes":{"type":"array","items":{"type":"string","enum":["nano","small","medium","large"]},"default":["nano","small","medium"]},"allowedRegistries":{"type":"array","items":{"type":"string"},"default":["docker.io","ghcr.io","quay.io"]},"maxSleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","default":"never","description":"The longest sleep this credential may give a briq, \"never\" included (\"never\": no bound of its own; the environment and the plan still apply)"},"expiresAt":{"type":"string","nullable":true,"format":"date-time","default":null}}},"spentTodayCents":{"type":"number"},"remainingTodayCents":{"type":"number"},"creditBalanceCents":{"type":"number"},"liveBriqs":{"type":"number","description":"Briqs creating or running that this credential started: what `maxConcurrentBriqs` counts"},"teamLiveBriqs":{"type":"number","description":"Briqs creating or running in the whole team, whoever started them: what the briq list shows"},"remainingConcurrency":{"type":"number"},"longestSleep":{"type":"string","description":"The longest sleep this credential may give a briq, every limit taken (environment, key, plan): \"7d\", or \"never\" when always on is allowed"},"diskGb":{"type":"number","description":"Volume GB the team holds: every briq not destroyed, stopped and failed ones included"},"maxDiskGb":{"type":"number","description":"The most volume GB the team's plan allows"}},"required":["plan","policy","spentTodayCents","remainingTodayCents","creditBalanceCents","liveBriqs","teamLiveBriqs","remainingConcurrency","longestSleep","diskGb","maxDiskGb"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/keys":{"get":{"tags":["account"],"security":[{"bearer":[]}],"summary":"List keys of the team","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"policy":{"type":"object","properties":{"maxConcurrentBriqs":{"type":"integer","minimum":0,"default":5},"dailySpendCapCents":{"type":"integer","minimum":0,"default":1000},"allowedSizes":{"type":"array","items":{"type":"string","enum":["nano","small","medium","large"]},"default":["nano","small","medium"]},"allowedRegistries":{"type":"array","items":{"type":"string"},"default":["docker.io","ghcr.io","quay.io"]},"maxSleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","default":"never","description":"The longest sleep this credential may give a briq, \"never\" included (\"never\": no bound of its own; the environment and the plan still apply)"},"expiresAt":{"type":"string","nullable":true,"format":"date-time","default":null}}},"createdAt":{"type":"string"},"lastUsedAt":{"type":"string","nullable":true},"revokedAt":{"type":"string","nullable":true}},"required":["id","name","prefix","policy","createdAt","lastUsedAt","revokedAt"]}}},"required":["keys"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"tags":["account"],"security":[{"bearer":[]}],"summary":"Mint a key. Session only: an API key cannot mint keys.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"policy":{"$ref":"#/components/schemas/KeyPolicy"},"mode":{"type":"string","enum":["live","test"]}},"required":["name"]}}}},"responses":{"201":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"prefix":{"type":"string"},"policy":{"type":"object","properties":{"maxConcurrentBriqs":{"type":"integer","minimum":0,"default":5},"dailySpendCapCents":{"type":"integer","minimum":0,"default":1000},"allowedSizes":{"type":"array","items":{"type":"string","enum":["nano","small","medium","large"]},"default":["nano","small","medium"]},"allowedRegistries":{"type":"array","items":{"type":"string"},"default":["docker.io","ghcr.io","quay.io"]},"maxSleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","default":"never","description":"The longest sleep this credential may give a briq, \"never\" included (\"never\": no bound of its own; the environment and the plan still apply)"},"expiresAt":{"type":"string","nullable":true,"format":"date-time","default":null}}}},"required":["id","key","prefix","policy"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/keys/{id}":{"patch":{"tags":["account"],"security":[{"bearer":[]}],"summary":"Rename a key or change its policy. Session only.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"policy":{"$ref":"#/components/schemas/KeyPolicy"}}}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"policy":{"type":"object","properties":{"maxConcurrentBriqs":{"type":"integer","minimum":0,"default":5},"dailySpendCapCents":{"type":"integer","minimum":0,"default":1000},"allowedSizes":{"type":"array","items":{"type":"string","enum":["nano","small","medium","large"]},"default":["nano","small","medium"]},"allowedRegistries":{"type":"array","items":{"type":"string"},"default":["docker.io","ghcr.io","quay.io"]},"maxSleep":{"type":"string","pattern":"^(?:never|[1-9][0-9]{0,4}[mhd])$","default":"never","description":"The longest sleep this credential may give a briq, \"never\" included (\"never\": no bound of its own; the environment and the plan still apply)"},"expiresAt":{"type":"string","nullable":true,"format":"date-time","default":null}}},"createdAt":{"type":"string"},"lastUsedAt":{"type":"string","nullable":true},"revokedAt":{"type":"string","nullable":true}},"required":["id","name","prefix","policy","createdAt","lastUsedAt","revokedAt"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"tags":["account"],"security":[{"bearer":[]}],"summary":"Revoke a key. Session only: a key cannot revoke another.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/audit":{"get":{"tags":["account"],"security":[{"bearer":[]}],"summary":"Audit events of the team","parameters":[{"schema":{"type":"integer","nullable":true,"maximum":500},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"key","in":"query"},{"schema":{"type":"string"},"required":false,"name":"agent","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}},"required":["events"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/usage":{"get":{"tags":["account"],"security":[{"bearer":[]}],"summary":"Daily usage for the team","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":90},"required":false,"name":"days","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"cents":{"type":"number"}},"required":["date","cents"]}},"totalCents":{"type":"number"}},"required":["days","totalCents"]}}}},"400":{"description":"validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"policy_violation or quota_exceeded (the key's policy), or payment_required (no credits: retrying cannot help)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden, or plan_limit (the team's plan does not allow it)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"invalid_state: not possible in the briq's current state; the message says why","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"validation: the body, the command or its output is too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate limited: retry after the `retry-after` header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"provider_error: the infrastructure refused the change","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"provider_error: the infrastructure did not answer; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on a briq whose machine is not running: { machineState, lastExit, providerSaid }, or { lastExit } once it is stopped"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}}}}