{"openapi":"3.0.0","info":{"title":"briq API","version":"0.0.0","description":"Services and sandboxes 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","resizing","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},"scope":{"type":"string","enum":["boot","team"]},"hosts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":253,"pattern":"^(\\*\\.)?[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$"},"minItems":1,"maxItems":20},"locations":{"type":"array","items":{"type":"string","enum":["header","body"]},"minItems":1}},"required":["secret"],"additionalProperties":false}]},"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},"volume":{"type":"object","nullable":true,"properties":{"mount":{"type":"string"},"gb":{"type":"integer"}},"default":null,"required":["mount","gb"],"description":"Its volume: where it is mounted and its size in GB; null without one"}},"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":{"anyOf":[{"type":"string","minLength":1,"maxLength":8192},{"type":"array","items":{"type":"string","maxLength":8192},"maxItems":64}],"description":"The command: a string, run with sh -c (\"npm start\"), or the argv. Default: the image's"},"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},"scope":{"type":"string","enum":["boot","team"]},"hosts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":253,"pattern":"^(\\*\\.)?[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$"},"minItems":1,"maxItems":20},"locations":{"type":"array","items":{"type":"string","enum":["header","body"]},"minItems":1}},"required":["secret"],"additionalProperties":false}]},"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},"copy":{"type":"string","enum":["never"],"description":"\"never\": no fork of the briq and no backup of the volume, for one that holds sign-ins"}},"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":{"image":{"type":"string","minLength":3,"maxLength":255,"pattern":"^[a-z0-9][a-z0-9._\\/-]*(?::[\\w.-]+)?(?:@sha256:[a-f0-9]{64})?$","description":"Another tag (postgres:17) or a compatible image (pgvector/pgvector:pg16). Default: the recipe's"},"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},"scope":{"type":"string","enum":["boot","team"]},"hosts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":253,"pattern":"^(\\*\\.)?[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$"},"minItems":1,"maxItems":20},"locations":{"type":"array","items":{"type":"string","enum":["header","body"]},"minItems":1}},"required":["secret"],"additionalProperties":false}]},"description":"Added to the recipe's env, or replacing one of its values: a string, or { secret: NAME, value } for a credential"},"cmd":{"anyOf":[{"type":"string","minLength":1,"maxLength":8192},{"type":"array","items":{"type":"string","maxLength":8192},"maxItems":64}],"description":"The command: a string run with sh -c (\"npm start\"), or the argv. A language recipe's start command"},"size":{"type":"string","enum":["nano","small","medium","large"]},"volume":{"type":"object","properties":{"gb":{"type":"integer","minimum":1,"maximum":500}},"required":["gb"],"description":"The volume: { gb }"},"files":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"base64":{"type":"string"}},"required":["base64"]}]},"description":"Files, path → text or { base64 }: an app's code for a language recipe"},"ports":{"type":"array","items":{"type":"integer","minimum":1,"maximum":65535},"description":"A language recipe: the port the app listens on, [8080] by default"},"checkout":{"type":"object","properties":{"repo":{"type":"string"},"ref":{"type":"string"},"path":{"type":"string"},"token":{"type":"object","properties":{"secret":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_.-]*$"},"value":{"type":"string"}},"required":["secret"]}},"required":["repo"],"description":"A language or static recipe: the code from a repo, as actions/checkout. { repo: \"github.com/owner/app\", ref?, path?, token? }"},"steps":{"type":"array","items":{"type":"object","properties":{"run":{"type":"string"}},"required":["run"]},"description":"A language recipe: shell commands run before the app starts, as GitHub Actions steps. [{ run: \"npm ci\" }, { run: \"npm run build\" }]"},"routes":{"type":"object","additionalProperties":{"type":"string"},"description":"The nginx recipe: path prefix → \"briq:port\", e.g. { \"/api/\": \"backend:8080\" }"},"recipe":{"type":"string","description":"A recipe (GET /v1/recipes). Beside it, the fields of the service it makes, as a GitHub Actions service: image, env, cmd, size, volume, files; a language recipe also takes checkout, steps and ports. GET /v1/recipes/{name} lists what each takes and its defaults"},"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"]}]},"Exec":{"type":"object","properties":{"id":{"type":"string"},"briqId":{"type":"string"},"cmd":{"type":"array","items":{"type":"string"}},"state":{"type":"string","enum":["running","exited","timed_out","stopped","lost"],"description":"running until it ends: exited (by itself, see exitCode), timed_out (stopped at deadlineAt), stopped (on request), lost (the machine restarted without it)"},"exitCode":{"type":"number","nullable":true},"startedAt":{"type":"string"},"deadlineAt":{"type":"string"},"finishedAt":{"type":"string","nullable":true},"outputDir":{"type":"string","description":"Where the whole output is, in the briq: files out and err"},"briqRunning":{"type":"boolean","description":"False when the briq is not running: the state is the last one seen, and output is absent until it starts"},"output":{"type":"object","properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"stdoutBytes":{"type":"number"},"stderrBytes":{"type":"number"}},"required":["stdout","stderr","stdoutBytes","stderrBytes"],"description":"The last 64 KB of each stream and their whole sizes; absent when the briq is not running, and with offset (read instead)"},"read":{"type":"object","properties":{"stream":{"type":"string","enum":["stdout","stderr"]},"offset":{"type":"number","description":"Where data starts, in bytes"},"data":{"type":"string","description":"Up to 256 KB from offset, cut at a whole UTF-8 character"},"nextOffset":{"type":"number","description":"The offset to read from next"},"bytes":{"type":"number","description":"The stream's whole size so far, in bytes"},"eof":{"type":"boolean","description":"The command ended and data reaches the end of the stream: nothing more comes"}},"required":["stream","offset","data","nextOffset","bytes","eof"],"description":"With offset: one stream from that byte offset"},"input":{"type":"object","properties":{"open":{"type":"boolean","description":"False once an eof was written"},"seq":{"type":"number","description":"The last write taken; the next one is seq + 1"}},"required":["open","seq"],"description":"Its standard input, when started with stdinOpen"}},"required":["id","briqId","cmd","state","exitCode","startedAt","deadlineAt","finishedAt","outputDir","briqRunning"]},"ExecStarted":{"type":"object","properties":{"exec":{"$ref":"#/components/schemas/Exec"},"costLine":{"type":"string"}},"required":["exec","costLine"]},"ExecList":{"type":"object","properties":{"execs":{"type":"array","items":{"$ref":"#/components/schemas/Exec"}}},"required":["execs"]},"ExecCheck":{"type":"object","properties":{"exec":{"$ref":"#/components/schemas/Exec"},"costLine":{"type":"string"}},"required":["exec","costLine"]},"ExecInputResult":{"type":"object","properties":{"seq":{"type":"number","description":"The number this write has"},"duplicate":{"type":"boolean","description":"True when that seq was already taken: nothing was written this time"},"costLine":{"type":"string"}},"required":["seq","duplicate","costLine"]},"ExecInputBody":{"type":"object","properties":{"data":{"type":"string","description":"Text to write, at most 64 KB as UTF-8"},"base64":{"type":"string","pattern":"^[A-Za-z0-9+/]*={0,2}$","description":"Bytes to write, as base64; instead of data"},"eof":{"type":"boolean","description":"Close the input after this write: the command reads end of file"},"seq":{"type":"integer","minimum":1,"description":"This write's number: the last one's plus one (input.seq of the exec, +1). The briq takes each number once, so a write sent again is not written twice. Without it, the next number"}}},"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":[]},"warning":{"type":"string"},"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}}},"ResizeBody":{"type":"object","properties":{"size":{"type":"string","enum":["nano","small","medium","large"],"description":"The new size. A running briq restarts at it"},"volume":{"type":"object","properties":{"gb":{"type":"integer","minimum":1,"maximum":500}},"required":["gb"],"description":"The volume, grown to { gb }: it only grows, and keeps what it holds"}}},"StackUpResult":{"type":"object","properties":{"stack":{"type":"string"},"briqs":{"type":"array","items":{"$ref":"#/components/schemas/Briq"},"description":"Every briq of the file's services, in file order: made now, or there already"},"created":{"type":"array","items":{"type":"string"},"description":"The services this up made"},"existing":{"type":"array","items":{"type":"string"},"description":"The services the stack had: left as they are"},"warnings":{"type":"array","items":{"type":"string"},"description":"An endpoint the file asks for that could not be opened yet; with `expose`, a briq not running whose outputs stay internal"},"outputs":{"type":"object","additionalProperties":{"type":"string"},"description":"Each recipe's connection strings, the secrets briq generated, and `<briq>:URL` for each published service. A key two services both have is `<briq>:<KEY>`"},"costLine":{"type":"string"}},"required":["stack","briqs","created","existing","outputs","costLine"]},"StackUpBody":{"type":"object","properties":{"file":{"type":"string","minLength":1,"description":"The stack file's content, YAML or JSON (briq.yaml)"},"stack":{"type":"string","description":"The stack to bring up instead of the file's `stack`: a branch's, a fork's"},"secrets":{"type":"object","additionalProperties":{"type":"string","maxLength":32768},"description":"Values for the secrets the file names as { secret: NAME }: an API key briq cannot generate. Never in the file. A secret without a value here is generated"},"expose":{"type":"boolean","description":"Reach the stack from outside briq: database ports get TLS endpoints, and outputs use them and the URLs the file publishes. Waits for the briqs. The file's own `expose` still decides each URL's mode"},"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":["file"]},"StackForkBody":{"type":"object","properties":{"into":{"type":"string"},"expose":{"type":"string","enum":["public","private"],"description":"Reach the fork from outside briq: database ports get TLS endpoints, front doors a URL in this mode (\"private\": only whoever has it). Outputs then use them. Waits for the forks"},"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/secrets":{"get":{"tags":["account"],"security":[{"bearer":[]}],"summary":"List the team secrets: names, hosts and where they go. Never a value.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secrets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hosts":{"type":"array","items":{"type":"string"}},"locations":{"type":"array","items":{"type":"string","enum":["header","body"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lastUsedAt":{"type":"string","nullable":true}},"required":["id","name","hosts","locations","createdAt","updatedAt","lastUsedAt"]}}},"required":["secrets"]}}}},"400":{"description":"Validation 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"]}}}},"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":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on 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":"Add a team secret. Briqs name it as { secret: NAME, scope: \"team\" } and get a placeholder; the credential gateway puts the value in, to these hosts only.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_.-]*$","description":"How briqs refer to it: { secret: \"GITHUB_TOKEN\", scope: \"team\" }"},"value":{"type":"string","minLength":1,"maxLength":32768,"description":"The credential. Write-only"},"hosts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":253,"pattern":"^(\\*\\.)?[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$"},"minItems":1,"maxItems":20,"description":"The hosts it may be sent to; nothing else ever sees it"},"locations":{"type":"array","items":{"type":"string","enum":["header","body"]},"minItems":1,"default":["header"],"description":"Where it is put in: \"header\" (the usual), \"body\" for a form or JSON field"}},"required":["name","value","hosts"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hosts":{"type":"array","items":{"type":"string"}},"locations":{"type":"array","items":{"type":"string","enum":["header","body"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lastUsedAt":{"type":"string","nullable":true}},"required":["id","name","hosts","locations","createdAt","updatedAt","lastUsedAt"]}}}},"400":{"description":"Validation 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"]}}}},"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":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on 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/secrets/{id}":{"patch":{"tags":["account"],"security":[{"bearer":[]}],"summary":"Rotate a team secret, or change its hosts or locations. Session only.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":32768,"description":"A new value: a rotation"},"hosts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":253,"pattern":"^(\\*\\.)?[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$"},"minItems":1,"maxItems":20},"locations":{"type":"array","items":{"type":"string","enum":["header","body"]},"minItems":1}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hosts":{"type":"array","items":{"type":"string"}},"locations":{"type":"array","items":{"type":"string","enum":["header","body"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lastUsedAt":{"type":"string","nullable":true}},"required":["id","name","hosts","locations","createdAt","updatedAt","lastUsedAt"]}}}},"400":{"description":"Validation 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"]}}}},"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":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on 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":"Delete a team secret. Briqs that named it keep a placeholder that opens nothing.","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 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"]}}}},"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":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"description":"More on the error. For invalid_state on 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"]}}}}}},"patch":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Resize a briq: another size, a bigger volume","description":"The same briq, its disk and volume kept. A new size restarts a running briq (its processes start over); a stopped or sleeping one takes it at its next start. A volume only grows, under a running briq without a restart. Checked like a create (sizes, disk, credits). Answers once the change lands (up to 30 s), or with `resizing`. The same size and volume: no change.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResizeBody"}}}},"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"]}}}}}}},"/v1/briqs/{id}/exec":{"post":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Run a command inside a briq","description":"Runs the command and answers with its output, for up to 60 s. With `async: true`, starts it and answers at once (202) with an exec to check, read and stop later: for anything that can take longer. Async needs sh in the image.","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":86400000,"description":"Without async: 60000 by default and at most. With async: when to stop it, 3600000 (1 h) by default, 86400000 (24 h) at most"},"stdin":{"type":"string","maxLength":2000000,"description":"Fed to the command's standard input"},"async":{"type":"boolean","description":"Start the command and answer at once with an exec to check later (GET /briqs/{id}/execs/{execId}): for anything that can take over a minute. Needs sh in the image"},"stdinOpen":{"type":"boolean","description":"With async: keep its standard input open, to write to while it runs (POST /briqs/{id}/execs/{execId}/input) until an eof. Not with stdin"},"env":{"type":"object","additionalProperties":{"type":"string","pattern":"^[^\\0]*$"},"description":"Variables for this command only, over the briq's own. Never on its command line, never in status or the audit log (names only)"},"clearEnv":{"type":"boolean","description":"Start the command from an empty environment: only the briq's PATH, HOME and LANG, then env"}},"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"},"warning":{"type":"string","description":"Set when timeoutMs was over 60000 without async: it ran with 60000"}},"required":["stdout","stderr","exitCode","timedOut","costLine"]}}}},"202":{"description":"started: check it with GET /briqs/{id}/execs/{execId}","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecStarted"}}}},"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}/execs":{"get":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"List a briq's async execs","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecList"}}}},"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}/execs/{execId}":{"get":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Check an async exec","description":"Its state and the last 64 KB of its output. `waitMs` (up to 45000) waits for it to finish first. With `offset`, one stream (`stream`, stdout by default) from that byte offset instead, up to `maxBytes` (256 KB): follow `read.nextOffset` until `read.eof` to read every byte once; `waitMs` then waits for output past the offset.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"execId","in":"path"},{"schema":{"type":"integer","nullable":true,"minimum":0,"maximum":45000,"description":"Wait up to this long for the command to finish (45000 at most), or with offset for output past it; 0 by default"},"required":false,"description":"Wait up to this long for the command to finish (45000 at most), or with offset for output past it; 0 by default","name":"waitMs","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"description":"Read one stream from this byte offset (up to 256 KB) instead of the tails; follow read.nextOffset for the rest"},"required":false,"description":"Read one stream from this byte offset (up to 256 KB) instead of the tails; follow read.nextOffset for the rest","name":"offset","in":"query"},{"schema":{"type":"string","enum":["stdout","stderr"],"description":"The stream offset reads; stdout by default"},"required":false,"description":"The stream offset reads; stdout by default","name":"stream","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":262144,"description":"With offset: the most to read, 262144 (256 KB) by default and at most"},"required":false,"description":"With offset: the most to read, 262144 (256 KB) by default and at most","name":"maxBytes","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecCheck"}}}},"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":"Stop an async exec","description":"Stops the command and every process it started. A finished one is answered as it is.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"execId","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecCheck"}}}},"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}/execs/{execId}/input":{"post":{"tags":["briqs"],"security":[{"bearer":[]}],"summary":"Write to a running exec","description":"Writes `data` (text) or `base64` (bytes), at most 64 KB, to the standard input of an exec started with `stdinOpen`, and with `eof` closes it. Writes land in order. `seq` (the last one plus one) makes a write safe to send again: the briq takes each number once.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"execId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecInputBody"}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecInputResult"}}}},"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"]}}}}}},"delete":{"tags":["stacks"],"security":[{"bearer":[]}],"summary":"Destroy every briq of a stack","description":"The stack stays, empty, so its name can be used again.","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/up":{"post":{"tags":["stacks"],"security":[{"bearer":[]}],"summary":"Bring a stack up from a stack file (briq.yaml)","description":"Creates each service of the file the stack does not have, as `POST /v1/briqs` makes it and under the same checks: all of them or none. Leaves the services the stack has as they are; never changes or deletes one. Secrets the file names come in `secrets`. Answers once the new briqs are ready, for up to `waitTimeoutMs`, unless `wait: false`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackUpBody"}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackUpResult"}}}},"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"},"team":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"]},"key":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["key","oauth"]},"name":{"type":"string"}},"required":["id","kind","name"],"description":"The key or connected client (`oauth`) this call presents; null from a dashboard session"}},"required":["plan","policy","spentTodayCents","remainingTodayCents","creditBalanceCents","liveBriqs","teamLiveBriqs","remainingConcurrency","longestSleep","diskGb","maxDiskGb","team","key"]}}}},"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"]}}}}}}}}}