{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "Coldtea /v1",
    "version": "1.0.0",
    "description": "Run Coldtea from anything that speaks HTTP.\n\nThree products share this API and one key can hold any of them. QA\nruns tests and reports verdicts; Tasks reads and writes the work on\nyour board; Monitoring reads production monitoring and can pause and\nresume it. Scopes name which — `qa:read`, `tasks:write`,\n`monitoring:read` — and an endpoint states the one it needs.\n\nEvery response carries a request id, in `meta.requestId` and in the\n`X-Coldtea-Request-Id` header. Quote it when reporting a problem.\n\n**Read `outcome`, not `status`.** A QA run that abstained has\n`status: \"failed\"` with `verdict: null` and `outcome: \"couldnt_verify\"`.\nBranching on `status` reports a broken app when nothing was broken.\n\n**Never send `organizationId`.** Your key already says which\norganization you are; naming one is rejected with a 400.\n\n## Polling\n\n`in_progress` is the ONLY non-terminal outcome. Poll `GET /v1/runs/{runId}`\nand stop when `data.outcome` is anything else — every other value means the\nrun is over and will not change. Three seconds between polls is plenty.\n\nFor a batch, poll `GET /v1/runs?batchId=…`, and read `skippedCount` and\n`insufficientCredits` from the START response: a test skipped at admission\nnever becomes a run, so no amount of polling will show it.\n\n## How the pieces fit\n\nA project holds **groups**; a group holds **tests** and binds the\n**environment** they open in. Tests carry no environment of their own — that\nbinding lives on the group, as `settings.environmentId`, which is the one\npart of the shape the paths do not make obvious.\n\nThere is no pull-request-opened trigger. To test pull requests, create a\n`deployment` rule with `match.requiresPullRequest: true`, or a `webhook` rule\nyour CI calls. A rule is also the only thing that reports a check back onto\nthe pull request."
  },
  "tags": [
    {
      "name": "projects",
      "description": "Projects hold groups, tests and runs."
    },
    {
      "name": "groups",
      "description": "A group holds tests and binds the environment they open in."
    },
    {
      "name": "tests",
      "description": "One test is one plain-English description of what to check."
    },
    {
      "name": "runs",
      "description": "Starting runs, and reading how they ended."
    },
    {
      "name": "environments",
      "description": "Where a run opens: an address, plus how to sign in."
    },
    {
      "name": "monitoring",
      "description": "Production monitoring: the repositories it runs on, their settings, the daily brief, and pause/resume."
    },
    {
      "name": "credentials",
      "description": "Stored secrets. Write-only; nothing reads one back."
    },
    {
      "name": "rules",
      "description": "What runs QA when nobody asks, and the only path that reports a check onto a pull request."
    },
    {
      "name": "repositories",
      "description": "The repositories we can see, and the ids for linking one."
    },
    {
      "name": "builds",
      "description": "Uploading and registering mobile builds."
    },
    {
      "name": "merges",
      "description": "Merging one project into another."
    },
    {
      "name": "hooks",
      "description": "The URL your CI calls to fire a webhook rule."
    },
    {
      "name": "me",
      "description": "Who this key is."
    }
  ],
  "servers": [
    {
      "url": "https://www.coldtea.ai",
      "description": "Production"
    },
    {
      "url": "http://localhost:3003",
      "description": "Local dev server"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "A key from Settings → API Keys, sent as `Authorization: Bearer coldtea_sk_…`. The key identifies your organization."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "meta"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "details"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "The stable value to branch on. `message` is for humans and can change."
              },
              "message": {
                "type": "string"
              },
              "details": {
                "description": "Structured extras, or `null` when there are none."
              }
            }
          },
          "meta": {
            "type": "object",
            "required": [
              "requestId"
            ],
            "properties": {
              "requestId": {
                "type": "string",
                "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                "examples": [
                  "req_9f2c1b7a03e8d45a61b0"
                ]
              }
            }
          }
        }
      }
    }
  },
  "paths": {
    "/v1/builds/{buildId}/confirm": {
      "post": {
        "summary": "Confirm an uploaded build",
        "description": "Step three of the upload. Echo `uploadId`, `objectKey`, `fileName`, `sizeBytes` and `platform` back EXACTLY as initiate returned them — they are the staging contract, not free inputs. `sha256` is verified against the bytes that landed, so a truncated upload fails here rather than at run time.\n\nAnswers 202: registration continues in the background. Poll `GET /v1/builds/{buildId}` until `ready` or `failed`.",
        "operationId": "postV1BuildsBuildIdConfirm",
        "tags": [
          "builds"
        ],
        "parameters": [
          {
            "name": "buildId",
            "in": "path",
            "required": true,
            "description": "The buildId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uploadId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "objectKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "fileName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sizeBytes": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "platform": {
                    "type": "string",
                    "enum": [
                      "android",
                      "ios"
                    ]
                  },
                  "clientRequestId": {
                    "type": "string",
                    "pattern": "^mqcr_[A-Za-z0-9_-]+$"
                  },
                  "sha256": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{64}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "vcs": {
                    "type": "object",
                    "properties": {
                      "provider": {
                        "type": "string",
                        "minLength": 1
                      },
                      "repositoryId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "headSha": {
                        "type": "string",
                        "minLength": 1
                      },
                      "prNumber": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "provider",
                      "repositoryId",
                      "headSha"
                    ]
                  }
                },
                "required": [
                  "uploadId",
                  "objectKey",
                  "fileName",
                  "sizeBytes",
                  "platform",
                  "clientRequestId"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Confirm an uploaded build",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "buildId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "awaiting_upload",
                            "registering",
                            "ready",
                            "failed"
                          ]
                        }
                      },
                      "required": [
                        "buildId",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/builds/{buildId}": {
      "get": {
        "summary": "Get a build",
        "description": "Poll a build through `awaiting_upload` → `registering` → `ready` | `failed`. Once ready, `artifactId` is all you need to start a run against it.",
        "operationId": "getV1BuildsBuildId",
        "tags": [
          "builds"
        ],
        "parameters": [
          {
            "name": "buildId",
            "in": "path",
            "required": true,
            "description": "The buildId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get a build",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "buildId": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "artifactId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "appKey": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "platform": {
                          "type": "string",
                          "enum": [
                            "android",
                            "ios"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "awaiting_upload",
                            "registering",
                            "ready",
                            "failed"
                          ]
                        },
                        "version": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "fileName": {
                          "type": "string"
                        },
                        "sizeBytes": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "sha256": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "appIdentity": {
                          "type": "object",
                          "properties": {
                            "androidPackageName": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "iosBundleId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "androidPackageName",
                            "iosBundleId"
                          ],
                          "additionalProperties": false
                        },
                        "source": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "url"
                                },
                                "summary": {
                                  "type": "string"
                                },
                                "host": {
                                  "type": "string"
                                },
                                "fileName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "summary",
                                "host",
                                "fileName"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "github_actions_artifact"
                                },
                                "summary": {
                                  "type": "string"
                                },
                                "owner": {
                                  "type": "string"
                                },
                                "repo": {
                                  "type": "string"
                                },
                                "runId": {
                                  "type": "string"
                                },
                                "artifactName": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "headSha": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "branchName": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "workflowName": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "pullRequestNumber": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "summary",
                                "owner",
                                "repo",
                                "runId",
                                "artifactName",
                                "headSha",
                                "pullRequestNumber"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "uploaded_file"
                                },
                                "summary": {
                                  "type": "string"
                                },
                                "fileName": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "summary",
                                "fileName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "readyAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "failure": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "code",
                                "message"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "buildId",
                        "projectId",
                        "artifactId",
                        "appKey",
                        "platform",
                        "status",
                        "version",
                        "fileName",
                        "sizeBytes",
                        "sha256",
                        "appIdentity",
                        "source",
                        "createdAt",
                        "readyAt",
                        "failure"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      },
      "delete": {
        "summary": "Delete a build",
        "description": "Refused with 409 `build_referenced_by_tests` while any test still names this build as its default.",
        "operationId": "deleteV1BuildsBuildId",
        "tags": [
          "builds"
        ],
        "parameters": [
          {
            "name": "buildId",
            "in": "path",
            "required": true,
            "description": "The buildId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "force",
            "in": "query",
            "required": false,
            "description": "Delete even while tests name this build as their default, instead of refusing with 409.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Delete a build",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The request id. On a 204 this is the ONLY place it appears — there is no body to carry `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/credentials/{credentialId}": {
      "patch": {
        "summary": "Rename a credential",
        "description": "The name only. The secret is rotated through `POST /v1/credentials/{credentialId}/secret`, and where the credential is used is a property of the environment, not of this record.",
        "operationId": "patchV1CredentialsCredentialId",
        "tags": [
          "credentials"
        ],
        "parameters": [
          {
            "name": "credentialId",
            "in": "path",
            "required": true,
            "description": "The credentialId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rename a credential",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "credentialId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "credentialId",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      },
      "delete": {
        "summary": "Delete a credential",
        "description": "Refused with 409 `credential_in_use` while an environment still references it. Detach it there first.",
        "operationId": "deleteV1CredentialsCredentialId",
        "tags": [
          "credentials"
        ],
        "parameters": [
          {
            "name": "credentialId",
            "in": "path",
            "required": true,
            "description": "The credentialId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Delete a credential",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The request id. On a 204 this is the ONLY place it appears — there is no body to carry `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/credentials/{credentialId}/secret": {
      "post": {
        "summary": "Rotate a credential's secret",
        "description": "Replaces the secret in place; the credential keeps its id, name and every environment that references it.\n\nA `basic_auth` rotation REQUIRES `username` as well as `password`: the username is half the credential and lives inside the encrypted payload, so rotating only the password would store a password with no login beside it.\n\nThere is no endpoint that reads a secret back.",
        "operationId": "postV1CredentialsCredentialIdSecret",
        "tags": [
          "credentials"
        ],
        "parameters": [
          {
            "name": "credentialId",
            "in": "path",
            "required": true,
            "description": "The credentialId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "method": {
                        "type": "string",
                        "const": "vercel_bypass"
                      },
                      "token": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "method",
                      "token"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "method": {
                        "type": "string",
                        "const": "basic_auth"
                      },
                      "username": {
                        "type": "string",
                        "minLength": 1
                      },
                      "password": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "method",
                      "username",
                      "password"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "method": {
                        "type": "string",
                        "const": "custom_headers"
                      },
                      "headers": {
                        "minItems": 1,
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128,
                              "pattern": "^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "value"
                          ]
                        }
                      }
                    },
                    "required": [
                      "method",
                      "headers"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rotate a credential's secret",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "credentialId": {
                          "type": "string"
                        },
                        "wallType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "vercel_bypass",
                                "basic_auth",
                                "custom_headers"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "credentialId",
                        "wallType",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/credentials": {
      "get": {
        "summary": "List credentials",
        "description": "Metadata only — name, method, where it is used. Secrets are never returned by any endpoint.",
        "operationId": "getV1Credentials",
        "tags": [
          "credentials"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "description": "Narrow the listing to one project's shelf. Absent is the TeaHouse-wide listing. Credentials that record no project are TeaHouse-wide and appear either way.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List credentials",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "credentialId": {
                            "type": "string"
                          },
                          "projectId": {
                            "type": "string"
                          },
                          "ownerEnvironmentId": {
                            "type": "string"
                          },
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "wallType": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "vercel_bypass",
                                  "basic_auth",
                                  "custom_headers"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "environments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "environmentId": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "environmentId",
                                "name"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "credentialId",
                          "name",
                          "wallType",
                          "createdAt",
                          "updatedAt",
                          "environments"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor",
                        "unlistedCredentials"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        },
                        "unlistedCredentials": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "AT LEAST this many credentials exist that this listing cannot name. They were stored before a credential recorded which TeaHouse it belongs to, so the query behind this listing cannot reach them. It is a FLOOR, NOT A TOTAL — the count comes from the ids this TeaHouse's own environments spend, so a legacy credential nothing references is invisible even to this number. `0` means the listing is complete."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      },
      "post": {
        "summary": "Create a credential",
        "description": "Stores a secret for an environment to sign in with. Write-only: once stored, the value can be rotated but never read back.\n\nFrom a terminal or CI, pipe the secret in rather than typing it as an argument — command lines land in shell history and build logs.",
        "operationId": "postV1Credentials",
        "tags": [
          "credentials"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "method": {
                        "type": "string",
                        "const": "vercel_bypass"
                      },
                      "token": {
                        "type": "string"
                      },
                      "name": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "environmentId": {
                        "description": "The environment that owns this credential. ABSENT or `null` means no environment owns it; it stays attachable anywhere.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "projectId": {
                        "description": "The project this credential belongs to. ABSENT means TeaHouse-wide — spendable from every project in the account.",
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "method",
                      "token"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "method": {
                        "type": "string",
                        "const": "basic_auth"
                      },
                      "username": {
                        "type": "string",
                        "minLength": 1
                      },
                      "password": {
                        "type": "string"
                      },
                      "name": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "environmentId": {
                        "description": "The environment that owns this credential. ABSENT or `null` means no environment owns it; it stays attachable anywhere.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "projectId": {
                        "description": "The project this credential belongs to. ABSENT means TeaHouse-wide — spendable from every project in the account.",
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "method",
                      "username",
                      "password"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "method": {
                        "type": "string",
                        "const": "custom_headers"
                      },
                      "headers": {
                        "minItems": 1,
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128,
                              "pattern": "^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "value"
                          ]
                        }
                      },
                      "name": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "environmentId": {
                        "description": "The environment that owns this credential. ABSENT or `null` means no environment owns it; it stays attachable anywhere.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "projectId": {
                        "description": "The project this credential belongs to. ABSENT means TeaHouse-wide — spendable from every project in the account.",
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "method",
                      "headers"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a credential",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "credentialId": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "ownerEnvironmentId": {
                          "type": "string"
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "wallType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "vercel_bypass",
                                "basic_auth",
                                "custom_headers"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "environments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "environmentId": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "environmentId",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "credentialId",
                        "name",
                        "wallType",
                        "createdAt",
                        "updatedAt",
                        "environments"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/environments/{environmentId}": {
      "get": {
        "summary": "Get an environment",
        "description": "An environment is a PLACE a run opens in — a URL, plus whatever signing in there requires.",
        "operationId": "getV1EnvironmentsEnvironmentId",
        "tags": [
          "environments"
        ],
        "parameters": [
          {
            "name": "environmentId",
            "in": "path",
            "required": true,
            "description": "The environmentId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get an environment",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "environmentId": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "identity": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "testUserId": {
                                      "type": "string"
                                    },
                                    "authTargetId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "testUserId",
                                    "authTargetId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "identities": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "testUserId": {
                                    "type": "string"
                                  },
                                  "authTargetId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "testUserId",
                                  "authTargetId"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "credentialName": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "kind": {
                              "type": "string",
                              "const": "web"
                            },
                            "web": {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "access": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "none"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "vercel_bypass"
                                        },
                                        "secretLast4": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "credentialId": {
                                          "type": "string"
                                        },
                                        "credentialRef": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "basic_auth"
                                        },
                                        "username": {
                                          "type": "string"
                                        },
                                        "secretLast4": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "credentialId": {
                                          "type": "string"
                                        },
                                        "credentialRef": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "custom_headers"
                                        },
                                        "headerNames": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        "credentialId": {
                                          "type": "string"
                                        },
                                        "credentialRef": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "headerNames"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "scope": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "vercelProjectId": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "allowAnyUrl": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "vercelProjectId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "url",
                                "access"
                              ],
                              "additionalProperties": false
                            },
                            "mobile": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "environmentId",
                            "name",
                            "identity",
                            "identities",
                            "credentialName",
                            "createdAt",
                            "updatedAt",
                            "kind",
                            "web",
                            "mobile"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "environmentId": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "identity": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "testUserId": {
                                      "type": "string"
                                    },
                                    "authTargetId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "testUserId",
                                    "authTargetId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "identities": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "testUserId": {
                                    "type": "string"
                                  },
                                  "authTargetId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "testUserId",
                                  "authTargetId"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "credentialName": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "kind": {
                              "type": "string",
                              "const": "mobile"
                            },
                            "mobile": {
                              "type": "object",
                              "properties": {
                                "platform": {
                                  "type": "string",
                                  "enum": [
                                    "android",
                                    "ios"
                                  ]
                                },
                                "deviceProfile": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "platform": {
                                      "type": "string",
                                      "enum": [
                                        "android",
                                        "ios"
                                      ]
                                    },
                                    "providerMetadata": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "const": "appetize"
                                            },
                                            "device": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "osVersion": {
                                              "type": "string",
                                              "minLength": 1
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "device",
                                            "osVersion"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "platform",
                                    "providerMetadata"
                                  ],
                                  "additionalProperties": false
                                },
                                "defaultBuild": {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "url"
                                            },
                                            "url": {
                                              "type": "string",
                                              "format": "uri"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "url"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "github_actions_artifact"
                                            },
                                            "owner": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "repo": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "runId": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "artifactId": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "artifactName": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "headSha": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "pullRequestNumber": {
                                              "type": "integer",
                                              "exclusiveMinimum": 0,
                                              "maximum": 9007199254740991
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "owner",
                                            "repo",
                                            "runId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "uploaded_file"
                                            },
                                            "artifactId": {
                                              "type": "string",
                                              "minLength": 1
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "artifactId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "registered_app"
                                            },
                                            "appKey": {
                                              "type": "string",
                                              "minLength": 1
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "appKey"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "platform",
                                "deviceProfile"
                              ],
                              "additionalProperties": false
                            },
                            "web": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "environmentId",
                            "name",
                            "identity",
                            "identities",
                            "credentialName",
                            "createdAt",
                            "updatedAt",
                            "kind",
                            "mobile",
                            "web"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      },
      "patch": {
        "summary": "Update an environment",
        "description": "Editing the URL or the sign-in of an environment that trigger rules depend on is refused with `409 environment_edit_affects_rules`, which names how many rules and which. Re-send with `acknowledgeAffectedRules: true` to go through. The field is not part of the environment — it is the caller confirming they have seen the consequence, so it is never stored and never returned.",
        "operationId": "patchV1EnvironmentsEnvironmentId",
        "tags": [
          "environments"
        ],
        "parameters": [
          {
            "name": "environmentId",
            "in": "path",
            "required": true,
            "description": "The environmentId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "identity": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "testUserId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "authTargetId": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "testUserId",
                          "authTargetId"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "identities": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "testUserId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "authTargetId": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "testUserId",
                        "authTargetId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "credentialName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "web": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "uri"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "access": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "none"
                              }
                            },
                            "required": [
                              "type"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "vercel_bypass"
                              },
                              "token": {
                                "type": "string"
                              },
                              "credentialId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "credentialRef": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "basic_auth"
                              },
                              "username": {
                                "type": "string",
                                "minLength": 1
                              },
                              "password": {
                                "type": "string"
                              },
                              "credentialId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "credentialRef": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "custom_headers"
                              },
                              "headers": {
                                "minItems": 1,
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128,
                                      "pattern": "^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"
                                    },
                                    "value": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "value"
                                  ]
                                }
                              },
                              "credentialId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "credentialRef": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type"
                            ]
                          }
                        ]
                      },
                      "scope": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "vercelProjectId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "allowAnyUrl": {
                                "type": "boolean",
                                "const": true
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  "mobile": {
                    "type": "object",
                    "properties": {
                      "deviceProfile": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "platform": {
                            "type": "string",
                            "enum": [
                              "android",
                              "ios"
                            ]
                          },
                          "providerMetadata": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "const": "appetize"
                                  },
                                  "device": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "osVersion": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "provider",
                                  "device",
                                  "osVersion"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "platform",
                          "providerMetadata"
                        ]
                      },
                      "defaultBuild": {
                        "anyOf": [
                          {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "url"
                                  },
                                  "url": {
                                    "type": "string",
                                    "format": "uri"
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "github_actions_artifact"
                                  },
                                  "owner": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "repo": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "runId": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "artifactId": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "artifactName": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "headSha": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "pullRequestNumber": {
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  }
                                },
                                "required": [
                                  "type",
                                  "owner",
                                  "repo",
                                  "runId"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "uploaded_file"
                                  },
                                  "artifactId": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "type",
                                  "artifactId"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "registered_app"
                                  },
                                  "appKey": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "type",
                                  "appKey"
                                ]
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  "acknowledgeAffectedRules": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update an environment",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "environmentId": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "identity": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "testUserId": {
                                      "type": "string"
                                    },
                                    "authTargetId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "testUserId",
                                    "authTargetId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "identities": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "testUserId": {
                                    "type": "string"
                                  },
                                  "authTargetId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "testUserId",
                                  "authTargetId"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "credentialName": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "kind": {
                              "type": "string",
                              "const": "web"
                            },
                            "web": {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "access": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "none"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "vercel_bypass"
                                        },
                                        "secretLast4": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "credentialId": {
                                          "type": "string"
                                        },
                                        "credentialRef": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "basic_auth"
                                        },
                                        "username": {
                                          "type": "string"
                                        },
                                        "secretLast4": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "credentialId": {
                                          "type": "string"
                                        },
                                        "credentialRef": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "custom_headers"
                                        },
                                        "headerNames": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        "credentialId": {
                                          "type": "string"
                                        },
                                        "credentialRef": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "headerNames"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "scope": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "vercelProjectId": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "allowAnyUrl": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "vercelProjectId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "url",
                                "access"
                              ],
                              "additionalProperties": false
                            },
                            "mobile": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "environmentId",
                            "name",
                            "identity",
                            "identities",
                            "credentialName",
                            "createdAt",
                            "updatedAt",
                            "kind",
                            "web",
                            "mobile"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "environmentId": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "identity": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "testUserId": {
                                      "type": "string"
                                    },
                                    "authTargetId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "testUserId",
                                    "authTargetId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "identities": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "testUserId": {
                                    "type": "string"
                                  },
                                  "authTargetId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "testUserId",
                                  "authTargetId"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "credentialName": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "kind": {
                              "type": "string",
                              "const": "mobile"
                            },
                            "mobile": {
                              "type": "object",
                              "properties": {
                                "platform": {
                                  "type": "string",
                                  "enum": [
                                    "android",
                                    "ios"
                                  ]
                                },
                                "deviceProfile": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "platform": {
                                      "type": "string",
                                      "enum": [
                                        "android",
                                        "ios"
                                      ]
                                    },
                                    "providerMetadata": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "const": "appetize"
                                            },
                                            "device": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "osVersion": {
                                              "type": "string",
                                              "minLength": 1
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "device",
                                            "osVersion"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "platform",
                                    "providerMetadata"
                                  ],
                                  "additionalProperties": false
                                },
                                "defaultBuild": {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "url"
                                            },
                                            "url": {
                                              "type": "string",
                                              "format": "uri"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "url"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "github_actions_artifact"
                                            },
                                            "owner": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "repo": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "runId": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "artifactId": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "artifactName": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "headSha": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "pullRequestNumber": {
                                              "type": "integer",
                                              "exclusiveMinimum": 0,
                                              "maximum": 9007199254740991
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "owner",
                                            "repo",
                                            "runId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "uploaded_file"
                                            },
                                            "artifactId": {
                                              "type": "string",
                                              "minLength": 1
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "artifactId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "registered_app"
                                            },
                                            "appKey": {
                                              "type": "string",
                                              "minLength": 1
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "appKey"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "platform",
                                "deviceProfile"
                              ],
                              "additionalProperties": false
                            },
                            "web": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "environmentId",
                            "name",
                            "identity",
                            "identities",
                            "credentialName",
                            "createdAt",
                            "updatedAt",
                            "kind",
                            "mobile",
                            "web"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      },
      "delete": {
        "summary": "Delete an environment",
        "description": "Refused with 409 `environment_in_use` while a group or test still points at it.",
        "operationId": "deleteV1EnvironmentsEnvironmentId",
        "tags": [
          "environments"
        ],
        "parameters": [
          {
            "name": "environmentId",
            "in": "path",
            "required": true,
            "description": "The environmentId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Delete an environment",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The request id. On a 204 this is the ONLY place it appears — there is no body to carry `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/groups/{groupId}": {
      "get": {
        "summary": "Get a group",
        "operationId": "getV1GroupsGroupId",
        "tags": [
          "groups"
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "description": "The groupId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get a group",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "environmentId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "environmentId"
                          ],
                          "additionalProperties": false
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "name",
                        "description",
                        "settings",
                        "createdAt",
                        "updatedAt",
                        "archivedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      },
      "patch": {
        "summary": "Rename or re-describe a group",
        "description": "There is deliberately no field for moving a group between projects: a group belongs to the project it was created in.",
        "operationId": "patchV1GroupsGroupId",
        "tags": [
          "groups"
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "description": "The groupId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "environmentId": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rename or re-describe a group",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "environmentId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "environmentId"
                          ],
                          "additionalProperties": false
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "name",
                        "description",
                        "settings",
                        "createdAt",
                        "updatedAt",
                        "archivedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      },
      "delete": {
        "summary": "Archive a group and its tests",
        "description": "A soft delete that cascades — the group's tests are archived too and their in-flight runs are canceled.",
        "operationId": "deleteV1GroupsGroupId",
        "tags": [
          "groups"
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "description": "The groupId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archive a group and its tests",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "environmentId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "environmentId"
                          ],
                          "additionalProperties": false
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "name",
                        "description",
                        "settings",
                        "createdAt",
                        "updatedAt",
                        "archivedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/groups/{groupId}/runs": {
      "post": {
        "summary": "Start a run for every test in a group",
        "description": "A batch. Tests skipped at admission — not runnable, or not enough credits — never become runs, so `skippedCount` and `insufficientCredits` on this response are the ONLY place they are ever reported. A caller that judges the batch on its runs alone will call a batch green that silently never ran half its tests.\n\n`clientRequestId` is required and must match `mqcr_<anything>`. The same id with the same body replays the original batch instead of billing twice; the same id with a DIFFERENT body is 409 `idempotency_key_reused`, because that is a caller bug, not a retry.",
        "operationId": "postV1GroupsGroupIdRuns",
        "tags": [
          "groups"
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "description": "The groupId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clientRequestId": {
                    "type": "string",
                    "pattern": "^mqcr_[A-Za-z0-9_-]+$"
                  },
                  "label": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "targetUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "buildReference": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "uploaded_file"
                      },
                      "artifactId": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The build to run against: the build id `builds upload` returns, or an artifact id."
                      }
                    },
                    "required": [
                      "type",
                      "artifactId"
                    ]
                  },
                  "vcs": {
                    "type": "object",
                    "properties": {
                      "provider": {
                        "type": "string",
                        "enum": [
                          "github",
                          "bitbucket"
                        ]
                      },
                      "repositoryId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "headSha": {
                        "type": "string",
                        "minLength": 1
                      },
                      "prNumber": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "provider",
                      "repositoryId",
                      "headSha",
                      "prNumber"
                    ]
                  },
                  "environmentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "clientRequestId"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Start a run for every test in a group",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "batchId": {
                          "type": "string"
                        },
                        "runs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "runId": {
                                "type": "string"
                              },
                              "testId": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "queued",
                                  "running",
                                  "waiting",
                                  "stopping",
                                  "completed",
                                  "failed",
                                  "canceled"
                                ]
                              }
                            },
                            "required": [
                              "runId",
                              "testId",
                              "status"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "skippedCount": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "Tests skipped at admission. They never become runs, so this is the ONLY place they are reported — polling the batch will never show them."
                        },
                        "failedCount": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "insufficientCredits": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "cost": {
                                  "type": "number"
                                },
                                "available": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "cost",
                                "available"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "replayed": {
                          "type": "boolean",
                          "description": "`true` when this request did NOT start anything — an earlier request with the same `clientRequestId` already did, and this is that answer replayed. THE PAYLOAD IS THE EARLIER ONE, so a batch that was empty then is empty now even if the group has tests today. A caller that treats a replay as a fresh result reports a green check over work that never ran."
                        }
                      },
                      "required": [
                        "batchId",
                        "runs",
                        "skippedCount",
                        "failedCount",
                        "insufficientCredits",
                        "replayed"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits to do this (`insufficient_credits`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The repository identity could not be verified (`identity_unverifiable`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:run"
            ]
          }
        ]
      }
    },
    "/v1/hooks/{token}": {
      "post": {
        "summary": "Trigger a webhook rule",
        "description": "Starts the runs a webhook rule defines. **This endpoint takes no API key.**\nThe token in the URL is the credential, so treat the whole URL as a secret\nand keep it in your CI provider's secret store.\n\nThis is also the only path that reports a check back onto a pull request:\ncheck names are reserved per repository by the rule, so a check from CI\ncomes from here and not from starting a run directly.",
        "operationId": "postV1HooksToken",
        "tags": [
          "hooks"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "The token.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "urlTemplate": {
                    "type": "string",
                    "minLength": 1
                  },
                  "prNumber": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "commitSha": {
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{7,64}$"
                  },
                  "buildReference": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "url"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "required": [
                          "type",
                          "url"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "github_actions_artifact"
                          },
                          "owner": {
                            "type": "string",
                            "minLength": 1
                          },
                          "repo": {
                            "type": "string",
                            "minLength": 1
                          },
                          "runId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "artifactId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "artifactName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "headSha": {
                            "type": "string",
                            "minLength": 1
                          },
                          "pullRequestNumber": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "type",
                          "owner",
                          "repo",
                          "runId"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "uploaded_file"
                          },
                          "artifactId": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "type",
                          "artifactId"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "registered_app"
                          },
                          "appKey": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "type",
                          "appKey"
                        ]
                      }
                    ]
                  },
                  "clientRequestId": {
                    "type": "string",
                    "pattern": "^mqcr_[A-Za-z0-9_-]+$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The delivery fired nothing — `status: \"skipped\"` with a reason. A rule that legitimately did not match is not a failure, so a CI step asserting 202 will read this as an outage.",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "ruleId": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "const": "queued"
                            },
                            "target": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "runs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "runId": {
                                    "type": "string"
                                  },
                                  "testId": {
                                    "type": "string"
                                  },
                                  "groupId": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "queued",
                                      "running",
                                      "waiting",
                                      "stopping",
                                      "completed",
                                      "failed",
                                      "canceled"
                                    ]
                                  }
                                },
                                "required": [
                                  "runId",
                                  "testId",
                                  "groupId",
                                  "status"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "ignored": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "ruleId",
                            "projectId",
                            "status",
                            "target",
                            "runs"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "ruleId": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "const": "skipped"
                            },
                            "reason": {
                              "type": "string",
                              "enum": [
                                "rule_disabled",
                                "project_not_active",
                                "no_attributable_actor",
                                "out_of_scope",
                                "no_target_url",
                                "no_target_build",
                                "target_build_unavailable",
                                "no_runnable_tests",
                                "insufficient_credits",
                                "actor_lost_access",
                                "exploration_needs_pull_request",
                                "exploration_environment_conflict"
                              ]
                            },
                            "ignored": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "ruleId",
                            "projectId",
                            "status",
                            "reason"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "The rule matched; runs were started.",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "ruleId": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "const": "queued"
                            },
                            "target": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "runs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "runId": {
                                    "type": "string"
                                  },
                                  "testId": {
                                    "type": "string"
                                  },
                                  "groupId": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "queued",
                                      "running",
                                      "waiting",
                                      "stopping",
                                      "completed",
                                      "failed",
                                      "canceled"
                                    ]
                                  }
                                },
                                "required": [
                                  "runId",
                                  "testId",
                                  "groupId",
                                  "status"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "ignored": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "ruleId",
                            "projectId",
                            "status",
                            "target",
                            "runs"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "ruleId": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "const": "skipped"
                            },
                            "reason": {
                              "type": "string",
                              "enum": [
                                "rule_disabled",
                                "project_not_active",
                                "no_attributable_actor",
                                "out_of_scope",
                                "no_target_url",
                                "no_target_build",
                                "target_build_unavailable",
                                "no_runnable_tests",
                                "insufficient_credits",
                                "actor_lost_access",
                                "exploration_needs_pull_request",
                                "exploration_environment_conflict"
                              ]
                            },
                            "ignored": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "ruleId",
                            "projectId",
                            "status",
                            "reason"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/me": {
      "get": {
        "summary": "Show the organization and key",
        "description": "Which organization this key belongs to, the key's name, its scopes and when it was last used. The cheapest endpoint there is: any valid key satisfies it, no scope required, so it is the right call for proving credentials work.\n\nThe secret itself is never returned — only its prefix and last four characters, enough to recognise which key it is.",
        "operationId": "getV1Me",
        "tags": [
          "me"
        ],
        "responses": {
          "200": {
            "description": "Show the organization and key",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "organizationId": {
                          "type": "string"
                        },
                        "organizationName": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "apiKey": {
                          "type": "object",
                          "properties": {
                            "keyId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "prefix": {
                              "type": "string"
                            },
                            "last4": {
                              "type": "string"
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "createdAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "lastUsedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "keyId",
                            "name",
                            "prefix",
                            "last4",
                            "scopes",
                            "createdAt",
                            "lastUsedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "organizationId",
                        "organizationName",
                        "apiKey"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/v1/merges/{mergeId}": {
      "get": {
        "summary": "Get a merge",
        "description": "Poll to `completed` or `failed`. A failed merge keeps whatever already moved; re-running the same merge resumes it rather than starting over.",
        "operationId": "getV1MergesMergeId",
        "tags": [
          "merges"
        ],
        "parameters": [
          {
            "name": "mergeId",
            "in": "path",
            "required": true,
            "description": "The mergeId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get a merge",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "mergeId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "running",
                            "completed",
                            "failed"
                          ]
                        },
                        "source": {
                          "type": "string"
                        },
                        "into": {
                          "type": "string"
                        },
                        "startedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "moved": {
                          "type": "object",
                          "properties": {
                            "groups": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "tests": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "runs": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "environments": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "rules": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "reportNames": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "credentials": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "testUsers": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "authTargets": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "groups",
                            "tests",
                            "runs",
                            "environments",
                            "rules",
                            "reportNames",
                            "credentials",
                            "testUsers",
                            "authTargets"
                          ],
                          "additionalProperties": false
                        },
                        "failure": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "mergeId",
                        "status",
                        "source",
                        "into",
                        "startedAt",
                        "completedAt",
                        "moved",
                        "failure"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      }
    },
    "/v1/monitoring/repositories/{settingsId}/brief": {
      "get": {
        "summary": "Show the latest daily brief",
        "description": "The repository's most recent production monitoring run: its status, the brief it wrote (null while the run is still going), and the ids of the tasks it filed. The id comes from `GET /v1/monitoring/repositories`.",
        "operationId": "getV1MonitoringRepositoriesSettingsIdBrief",
        "tags": [
          "monitoring"
        ],
        "parameters": [
          {
            "name": "settingsId",
            "in": "path",
            "required": true,
            "description": "The settingsId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Show the latest daily brief",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "dailyRunId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "startedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "timezone": {
                          "type": "string"
                        },
                        "brief": {
                          "anyOf": [
                            {},
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdTaskIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "dailyRunId",
                        "status",
                        "startedAt",
                        "completedAt",
                        "timezone",
                        "brief",
                        "createdTaskIds"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "monitoring:read"
            ]
          }
        ]
      }
    },
    "/v1/monitoring/repositories/{settingsId}": {
      "get": {
        "summary": "Show one monitored repository",
        "description": "The repository's production monitoring settings: running or paused, budget, split, working days, agent, and connected signal providers. The id comes from `GET /v1/monitoring/repositories`.",
        "operationId": "getV1MonitoringRepositoriesSettingsId",
        "tags": [
          "monitoring"
        ],
        "parameters": [
          {
            "name": "settingsId",
            "in": "path",
            "required": true,
            "description": "The settingsId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Show one monitored repository",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "repository": {
                          "type": "object",
                          "properties": {
                            "provider": {
                              "type": "string"
                            },
                            "repositoryId": {
                              "type": "string"
                            },
                            "fullName": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "provider",
                            "repositoryId",
                            "fullName"
                          ],
                          "additionalProperties": false
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "running",
                            "paused"
                          ]
                        },
                        "pausedBy": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "user",
                                "billing"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "timezone": {
                          "type": "string"
                        },
                        "permission": {
                          "type": "string"
                        },
                        "workSplit": {
                          "type": "object",
                          "properties": {
                            "maintenance": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "feature": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "maintenance",
                            "feature"
                          ],
                          "additionalProperties": false
                        },
                        "dailyDeliveryCapacityPoints": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "workingDays": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "defaultAgentKind": {
                          "type": "string"
                        },
                        "connectedSignals": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "repository",
                        "status",
                        "pausedBy",
                        "timezone",
                        "permission",
                        "workSplit",
                        "dailyDeliveryCapacityPoints",
                        "workingDays",
                        "defaultAgentKind",
                        "connectedSignals",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "monitoring:read"
            ]
          }
        ]
      },
      "patch": {
        "summary": "Pause or resume a monitored repository",
        "description": "Takes `{ \"status\": \"paused\" }` or `{ \"status\": \"running\" }` and nothing else. Pausing stops new work from being filed or started; it does not undo work already filed. Resuming picks the schedule back up. Budgets, splits, working days and agents are dashboard decisions and are not writable here.",
        "operationId": "patchV1MonitoringRepositoriesSettingsId",
        "tags": [
          "monitoring"
        ],
        "parameters": [
          {
            "name": "settingsId",
            "in": "path",
            "required": true,
            "description": "The settingsId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "running",
                      "paused"
                    ]
                  }
                },
                "required": [
                  "status"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pause or resume a monitored repository",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "repository": {
                          "type": "object",
                          "properties": {
                            "provider": {
                              "type": "string"
                            },
                            "repositoryId": {
                              "type": "string"
                            },
                            "fullName": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "provider",
                            "repositoryId",
                            "fullName"
                          ],
                          "additionalProperties": false
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "running",
                            "paused"
                          ]
                        },
                        "pausedBy": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "user",
                                "billing"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "timezone": {
                          "type": "string"
                        },
                        "permission": {
                          "type": "string"
                        },
                        "workSplit": {
                          "type": "object",
                          "properties": {
                            "maintenance": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "feature": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "maintenance",
                            "feature"
                          ],
                          "additionalProperties": false
                        },
                        "dailyDeliveryCapacityPoints": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "workingDays": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "defaultAgentKind": {
                          "type": "string"
                        },
                        "connectedSignals": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "repository",
                        "status",
                        "pausedBy",
                        "timezone",
                        "permission",
                        "workSplit",
                        "dailyDeliveryCapacityPoints",
                        "workingDays",
                        "defaultAgentKind",
                        "connectedSignals",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "monitoring:write"
            ]
          }
        ]
      }
    },
    "/v1/monitoring/repositories": {
      "get": {
        "summary": "List monitored repositories",
        "description": "Every repository production monitoring is set up on, with its settings: running or paused, budget, split, working days, agent, and which signal providers are connected. `id` is the handle the single-repository endpoints take.",
        "operationId": "getV1MonitoringRepositories",
        "tags": [
          "monitoring"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List monitored repositories",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "repository": {
                            "type": "object",
                            "properties": {
                              "provider": {
                                "type": "string"
                              },
                              "repositoryId": {
                                "type": "string"
                              },
                              "fullName": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "provider",
                              "repositoryId",
                              "fullName"
                            ],
                            "additionalProperties": false
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "running",
                              "paused"
                            ]
                          },
                          "pausedBy": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "billing"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "timezone": {
                            "type": "string"
                          },
                          "permission": {
                            "type": "string"
                          },
                          "workSplit": {
                            "type": "object",
                            "properties": {
                              "maintenance": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "feature": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "maintenance",
                              "feature"
                            ],
                            "additionalProperties": false
                          },
                          "dailyDeliveryCapacityPoints": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "workingDays": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "defaultAgentKind": {
                            "type": "string"
                          },
                          "connectedSignals": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "id",
                          "repository",
                          "status",
                          "pausedBy",
                          "timezone",
                          "permission",
                          "workSplit",
                          "dailyDeliveryCapacityPoints",
                          "workingDays",
                          "defaultAgentKind",
                          "connectedSignals",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "monitoring:read"
            ]
          }
        ]
      }
    },
    "/v1/projects/{projectId}/apps": {
      "get": {
        "summary": "List a project's mobile apps",
        "description": "The apps registered from uploaded builds, and the default build each one runs against.",
        "operationId": "getV1ProjectsProjectIdApps",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List a project's mobile apps",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "appKey": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "platform": {
                            "type": "string",
                            "enum": [
                              "android",
                              "ios"
                            ]
                          },
                          "androidPackageName": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "iosBundleId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "builds": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "buildId": {
                                  "type": "string"
                                },
                                "artifactId": {
                                  "type": "string"
                                },
                                "version": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "fileName": {
                                  "type": "string"
                                },
                                "sizeBytes": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "status": {
                                  "type": "string",
                                  "const": "ready"
                                },
                                "source": {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "url"
                                            },
                                            "summary": {
                                              "type": "string"
                                            },
                                            "host": {
                                              "type": "string"
                                            },
                                            "fileName": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "summary",
                                            "host",
                                            "fileName"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "github_actions_artifact"
                                            },
                                            "summary": {
                                              "type": "string"
                                            },
                                            "owner": {
                                              "type": "string"
                                            },
                                            "repo": {
                                              "type": "string"
                                            },
                                            "runId": {
                                              "type": "string"
                                            },
                                            "artifactName": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "headSha": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "branchName": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "workflowName": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "pullRequestNumber": {
                                              "anyOf": [
                                                {
                                                  "type": "integer",
                                                  "minimum": -9007199254740991,
                                                  "maximum": 9007199254740991
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "summary",
                                            "owner",
                                            "repo",
                                            "runId",
                                            "artifactName",
                                            "headSha",
                                            "pullRequestNumber"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "uploaded_file"
                                            },
                                            "summary": {
                                              "type": "string"
                                            },
                                            "fileName": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "summary",
                                            "fileName"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "buildId",
                                "artifactId",
                                "version",
                                "fileName",
                                "sizeBytes",
                                "createdAt",
                                "status",
                                "source"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "appKey",
                          "name",
                          "platform",
                          "androidPackageName",
                          "iosBundleId",
                          "builds"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      }
    },
    "/v1/projects/{projectId}/builds": {
      "post": {
        "summary": "Initiate a build upload",
        "description": "Step one of three. Returns a signed URL with a 10-minute TTL; PUT the file to it with exactly the headers returned, then confirm with `POST /v1/builds/{buildId}/confirm`.\n\nAndroid takes a `.apk`; iOS takes a Simulator `.app` inside a `.zip` or `.tar.gz`. Maximum 1 GB.",
        "operationId": "postV1ProjectsProjectIdBuilds",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "platform": {
                    "type": "string",
                    "enum": [
                      "android",
                      "ios"
                    ]
                  },
                  "fileName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sizeBytes": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "clientRequestId": {
                    "type": "string",
                    "pattern": "^mqcr_[A-Za-z0-9_-]+$"
                  },
                  "buildVersion": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "vcs": {
                    "type": "object",
                    "properties": {
                      "provider": {
                        "type": "string",
                        "minLength": 1
                      },
                      "repositoryId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "headSha": {
                        "type": "string",
                        "minLength": 1
                      },
                      "prNumber": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "provider",
                      "repositoryId",
                      "headSha"
                    ]
                  }
                },
                "required": [
                  "platform",
                  "fileName",
                  "sizeBytes",
                  "clientRequestId"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Initiate a build upload",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "buildId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "awaiting_upload",
                            "registering",
                            "ready",
                            "failed"
                          ]
                        },
                        "upload": {
                          "type": "object",
                          "properties": {
                            "uploadId": {
                              "type": "string"
                            },
                            "url": {
                              "type": "string"
                            },
                            "method": {
                              "type": "string",
                              "const": "PUT"
                            },
                            "headers": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {
                                "type": "string"
                              }
                            },
                            "objectKey": {
                              "type": "string"
                            },
                            "maxSizeBytes": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "expiresAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "uploadId",
                            "url",
                            "method",
                            "headers",
                            "objectKey",
                            "maxSizeBytes",
                            "expiresAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "buildId",
                        "status",
                        "upload"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/projects/{projectId}/environments": {
      "get": {
        "summary": "List a project's environments",
        "operationId": "getV1ProjectsProjectIdEnvironments",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List a project's environments",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "environmentId": {
                                "type": "string"
                              },
                              "projectId": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "identity": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "testUserId": {
                                        "type": "string"
                                      },
                                      "authTargetId": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "testUserId",
                                      "authTargetId"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "identities": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "testUserId": {
                                      "type": "string"
                                    },
                                    "authTargetId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "testUserId",
                                    "authTargetId"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "credentialName": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "kind": {
                                "type": "string",
                                "const": "web"
                              },
                              "web": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "access": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "none"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "vercel_bypass"
                                          },
                                          "secretLast4": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "credentialId": {
                                            "type": "string"
                                          },
                                          "credentialRef": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "basic_auth"
                                          },
                                          "username": {
                                            "type": "string"
                                          },
                                          "secretLast4": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "credentialId": {
                                            "type": "string"
                                          },
                                          "credentialRef": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "custom_headers"
                                          },
                                          "headerNames": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "credentialId": {
                                            "type": "string"
                                          },
                                          "credentialRef": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "headerNames"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  "scope": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "vercelProjectId": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "allowAnyUrl": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "vercelProjectId"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "url",
                                  "access"
                                ],
                                "additionalProperties": false
                              },
                              "mobile": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "environmentId",
                              "name",
                              "identity",
                              "identities",
                              "credentialName",
                              "createdAt",
                              "updatedAt",
                              "kind",
                              "web",
                              "mobile"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "environmentId": {
                                "type": "string"
                              },
                              "projectId": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "identity": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "testUserId": {
                                        "type": "string"
                                      },
                                      "authTargetId": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "testUserId",
                                      "authTargetId"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "identities": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "testUserId": {
                                      "type": "string"
                                    },
                                    "authTargetId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "testUserId",
                                    "authTargetId"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "credentialName": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "kind": {
                                "type": "string",
                                "const": "mobile"
                              },
                              "mobile": {
                                "type": "object",
                                "properties": {
                                  "platform": {
                                    "type": "string",
                                    "enum": [
                                      "android",
                                      "ios"
                                    ]
                                  },
                                  "deviceProfile": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "platform": {
                                        "type": "string",
                                        "enum": [
                                          "android",
                                          "ios"
                                        ]
                                      },
                                      "providerMetadata": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "provider": {
                                                "type": "string",
                                                "const": "appetize"
                                              },
                                              "device": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "osVersion": {
                                                "type": "string",
                                                "minLength": 1
                                              }
                                            },
                                            "required": [
                                              "provider",
                                              "device",
                                              "osVersion"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name",
                                      "platform",
                                      "providerMetadata"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "defaultBuild": {
                                    "anyOf": [
                                      {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "const": "url"
                                              },
                                              "url": {
                                                "type": "string",
                                                "format": "uri"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "url"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "const": "github_actions_artifact"
                                              },
                                              "owner": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "repo": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "runId": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "artifactId": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "artifactName": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "headSha": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "pullRequestNumber": {
                                                "type": "integer",
                                                "exclusiveMinimum": 0,
                                                "maximum": 9007199254740991
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "owner",
                                              "repo",
                                              "runId"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "const": "uploaded_file"
                                              },
                                              "artifactId": {
                                                "type": "string",
                                                "minLength": 1
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "artifactId"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "const": "registered_app"
                                              },
                                              "appKey": {
                                                "type": "string",
                                                "minLength": 1
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "appKey"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "platform",
                                  "deviceProfile"
                                ],
                                "additionalProperties": false
                              },
                              "web": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "environmentId",
                              "name",
                              "identity",
                              "identities",
                              "credentialName",
                              "createdAt",
                              "updatedAt",
                              "kind",
                              "mobile",
                              "web"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      },
      "post": {
        "summary": "Create an environment",
        "description": "The place runs open in: a URL, plus the credential that signs in there when one is needed.",
        "operationId": "postV1ProjectsProjectIdEnvironments",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "web",
                      "mobile"
                    ]
                  },
                  "identity": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "testUserId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "authTargetId": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "testUserId",
                          "authTargetId"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "identities": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "testUserId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "authTargetId": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "testUserId",
                        "authTargetId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "credentialName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "web": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "uri"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "access": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "none"
                              }
                            },
                            "required": [
                              "type"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "vercel_bypass"
                              },
                              "token": {
                                "type": "string"
                              },
                              "credentialId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "credentialRef": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "basic_auth"
                              },
                              "username": {
                                "type": "string",
                                "minLength": 1
                              },
                              "password": {
                                "type": "string"
                              },
                              "credentialId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "credentialRef": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "custom_headers"
                              },
                              "headers": {
                                "minItems": 1,
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128,
                                      "pattern": "^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"
                                    },
                                    "value": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "value"
                                  ]
                                }
                              },
                              "credentialId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "credentialRef": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type"
                            ]
                          }
                        ]
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "vercelProjectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "allowAnyUrl": {
                            "type": "boolean",
                            "const": true
                          }
                        }
                      }
                    },
                    "required": [
                      "access"
                    ]
                  },
                  "mobile": {
                    "type": "object",
                    "properties": {
                      "platform": {
                        "type": "string",
                        "enum": [
                          "android",
                          "ios"
                        ]
                      },
                      "deviceProfile": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "platform": {
                            "type": "string",
                            "enum": [
                              "android",
                              "ios"
                            ]
                          },
                          "providerMetadata": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "const": "appetize"
                                  },
                                  "device": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "osVersion": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "provider",
                                  "device",
                                  "osVersion"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "platform",
                          "providerMetadata"
                        ]
                      },
                      "defaultBuild": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "url"
                              },
                              "url": {
                                "type": "string",
                                "format": "uri"
                              }
                            },
                            "required": [
                              "type",
                              "url"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "github_actions_artifact"
                              },
                              "owner": {
                                "type": "string",
                                "minLength": 1
                              },
                              "repo": {
                                "type": "string",
                                "minLength": 1
                              },
                              "runId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "artifactId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "artifactName": {
                                "type": "string",
                                "minLength": 1
                              },
                              "headSha": {
                                "type": "string",
                                "minLength": 1
                              },
                              "pullRequestNumber": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "type",
                              "owner",
                              "repo",
                              "runId"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "uploaded_file"
                              },
                              "artifactId": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type",
                              "artifactId"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "registered_app"
                              },
                              "appKey": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type",
                              "appKey"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "platform",
                      "deviceProfile"
                    ]
                  }
                },
                "required": [
                  "name",
                  "kind"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create an environment",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "environmentId": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "identity": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "testUserId": {
                                      "type": "string"
                                    },
                                    "authTargetId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "testUserId",
                                    "authTargetId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "identities": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "testUserId": {
                                    "type": "string"
                                  },
                                  "authTargetId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "testUserId",
                                  "authTargetId"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "credentialName": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "kind": {
                              "type": "string",
                              "const": "web"
                            },
                            "web": {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "access": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "none"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "vercel_bypass"
                                        },
                                        "secretLast4": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "credentialId": {
                                          "type": "string"
                                        },
                                        "credentialRef": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "basic_auth"
                                        },
                                        "username": {
                                          "type": "string"
                                        },
                                        "secretLast4": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "credentialId": {
                                          "type": "string"
                                        },
                                        "credentialRef": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "custom_headers"
                                        },
                                        "headerNames": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        "credentialId": {
                                          "type": "string"
                                        },
                                        "credentialRef": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "headerNames"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "scope": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "vercelProjectId": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "allowAnyUrl": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "vercelProjectId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "url",
                                "access"
                              ],
                              "additionalProperties": false
                            },
                            "mobile": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "environmentId",
                            "name",
                            "identity",
                            "identities",
                            "credentialName",
                            "createdAt",
                            "updatedAt",
                            "kind",
                            "web",
                            "mobile"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "environmentId": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "identity": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "testUserId": {
                                      "type": "string"
                                    },
                                    "authTargetId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "testUserId",
                                    "authTargetId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "identities": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "testUserId": {
                                    "type": "string"
                                  },
                                  "authTargetId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "testUserId",
                                  "authTargetId"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "credentialName": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "kind": {
                              "type": "string",
                              "const": "mobile"
                            },
                            "mobile": {
                              "type": "object",
                              "properties": {
                                "platform": {
                                  "type": "string",
                                  "enum": [
                                    "android",
                                    "ios"
                                  ]
                                },
                                "deviceProfile": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "platform": {
                                      "type": "string",
                                      "enum": [
                                        "android",
                                        "ios"
                                      ]
                                    },
                                    "providerMetadata": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "const": "appetize"
                                            },
                                            "device": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "osVersion": {
                                              "type": "string",
                                              "minLength": 1
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "device",
                                            "osVersion"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "platform",
                                    "providerMetadata"
                                  ],
                                  "additionalProperties": false
                                },
                                "defaultBuild": {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "url"
                                            },
                                            "url": {
                                              "type": "string",
                                              "format": "uri"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "url"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "github_actions_artifact"
                                            },
                                            "owner": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "repo": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "runId": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "artifactId": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "artifactName": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "headSha": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "pullRequestNumber": {
                                              "type": "integer",
                                              "exclusiveMinimum": 0,
                                              "maximum": 9007199254740991
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "owner",
                                            "repo",
                                            "runId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "uploaded_file"
                                            },
                                            "artifactId": {
                                              "type": "string",
                                              "minLength": 1
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "artifactId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "registered_app"
                                            },
                                            "appKey": {
                                              "type": "string",
                                              "minLength": 1
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "appKey"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "platform",
                                "deviceProfile"
                              ],
                              "additionalProperties": false
                            },
                            "web": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "environmentId",
                            "name",
                            "identity",
                            "identities",
                            "credentialName",
                            "createdAt",
                            "updatedAt",
                            "kind",
                            "mobile",
                            "web"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/projects/{projectId}/groups": {
      "get": {
        "summary": "List a project's groups",
        "operationId": "getV1ProjectsProjectIdGroups",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List a project's groups",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "projectId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "settings": {
                            "type": "object",
                            "properties": {
                              "environmentId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "environmentId"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "archivedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "projectId",
                          "name",
                          "description",
                          "settings",
                          "createdAt",
                          "updatedAt",
                          "archivedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      },
      "post": {
        "summary": "Create a group",
        "operationId": "postV1ProjectsProjectIdGroups",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "description": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "environmentId": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a group",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "environmentId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "environmentId"
                          ],
                          "additionalProperties": false
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "name",
                        "description",
                        "settings",
                        "createdAt",
                        "updatedAt",
                        "archivedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/projects/{projectId}": {
      "get": {
        "summary": "Get a project",
        "description": "A project that was merged away resolves to its SURVIVOR, so the `id` in the response can differ from the one you asked for. That is the merge being followed, not an error.",
        "operationId": "getV1ProjectsProjectId",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get a project",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdByUserId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "createdVia": {
                          "type": "string",
                          "enum": [
                            "desktop",
                            "cli",
                            "api",
                            "migration"
                          ]
                        },
                        "mergedInto": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Set when this project was merged away. Reads follow it to the survivor, so the `id` you get back can differ from the one you asked for."
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "repo": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "github",
                                    "bitbucket"
                                  ]
                                },
                                "repositoryId": {
                                  "type": "string"
                                },
                                "fullName": {
                                  "type": "string"
                                },
                                "linkedByUserId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "linkedBy": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "userId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "userId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "apiKeyId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "apiKeyId"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "linkedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "provider",
                                "repositoryId",
                                "fullName",
                                "linkedByUserId",
                                "linkedBy",
                                "linkedAt"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "tests": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "groups": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "tests",
                            "groups"
                          ],
                          "additionalProperties": false
                        },
                        "lastRunAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "createdByUserId",
                        "createdAt",
                        "updatedAt",
                        "createdVia",
                        "mergedInto",
                        "archivedAt",
                        "repo",
                        "counts",
                        "lastRunAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      },
      "patch": {
        "summary": "Rename a project",
        "operationId": "patchV1ProjectsProjectId",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rename a project",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdByUserId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "createdVia": {
                          "type": "string",
                          "enum": [
                            "desktop",
                            "cli",
                            "api",
                            "migration"
                          ]
                        },
                        "mergedInto": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Set when this project was merged away. Reads follow it to the survivor, so the `id` you get back can differ from the one you asked for."
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "repo": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "github",
                                    "bitbucket"
                                  ]
                                },
                                "repositoryId": {
                                  "type": "string"
                                },
                                "fullName": {
                                  "type": "string"
                                },
                                "linkedByUserId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "linkedBy": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "userId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "userId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "apiKeyId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "apiKeyId"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "linkedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "provider",
                                "repositoryId",
                                "fullName",
                                "linkedByUserId",
                                "linkedBy",
                                "linkedAt"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "tests": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "groups": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "tests",
                            "groups"
                          ],
                          "additionalProperties": false
                        },
                        "lastRunAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "createdByUserId",
                        "createdAt",
                        "updatedAt",
                        "createdVia",
                        "mergedInto",
                        "archivedAt",
                        "repo",
                        "counts",
                        "lastRunAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      },
      "delete": {
        "summary": "Archive a project",
        "description": "A soft delete. `POST /v1/projects/{projectId}/restore` undoes it.",
        "operationId": "deleteV1ProjectsProjectId",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archive a project",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdByUserId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "createdVia": {
                          "type": "string",
                          "enum": [
                            "desktop",
                            "cli",
                            "api",
                            "migration"
                          ]
                        },
                        "mergedInto": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Set when this project was merged away. Reads follow it to the survivor, so the `id` you get back can differ from the one you asked for."
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "repo": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "github",
                                    "bitbucket"
                                  ]
                                },
                                "repositoryId": {
                                  "type": "string"
                                },
                                "fullName": {
                                  "type": "string"
                                },
                                "linkedByUserId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "linkedBy": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "userId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "userId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "apiKeyId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "apiKeyId"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "linkedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "provider",
                                "repositoryId",
                                "fullName",
                                "linkedByUserId",
                                "linkedBy",
                                "linkedAt"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "tests": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "groups": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "tests",
                            "groups"
                          ],
                          "additionalProperties": false
                        },
                        "lastRunAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "createdByUserId",
                        "createdAt",
                        "updatedAt",
                        "createdVia",
                        "mergedInto",
                        "archivedAt",
                        "repo",
                        "counts",
                        "lastRunAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/projects/{projectId}/merge": {
      "post": {
        "summary": "Merge this project into another",
        "description": "IRREVERSIBLE. Fetch the plan from `POST /v1/projects/{projectId}/merge/plan` first and show it to whoever is asking — it is a read-scoped dry run of exactly what moves.\n\nThe source project ends archived and merged into the survivor, and references to it answer as the survivor from then on. Answers 202; poll `GET /v1/merges/{mergeId}`.",
        "operationId": "postV1ProjectsProjectIdMerge",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "into": {
                    "type": "string",
                    "minLength": 1
                  },
                  "clientRequestId": {
                    "type": "string",
                    "pattern": "^mqcr_[A-Za-z0-9_-]+$"
                  }
                },
                "required": [
                  "into",
                  "clientRequestId"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Merge this project into another",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "mergeId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "running",
                            "completed",
                            "failed"
                          ]
                        },
                        "source": {
                          "type": "string"
                        },
                        "into": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "mergeId",
                        "status",
                        "source",
                        "into"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/projects/{projectId}/merge/plan": {
      "post": {
        "summary": "Plan a merge without performing it",
        "description": "A dry run, and `qa:read` on purpose: it moves nothing. Returns what would move and what happens to the repository link, so a caller can show the consequences before asking anyone to confirm them.",
        "operationId": "postV1ProjectsProjectIdMergePlan",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "into": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "into"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Plan a merge without performing it",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "source": {
                          "type": "string"
                        },
                        "into": {
                          "type": "string"
                        },
                        "moves": {
                          "type": "object",
                          "properties": {
                            "groups": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "tests": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "runs": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "environments": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "rules": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "reportNames": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "credentials": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "testUsers": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "authTargets": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "groups",
                            "tests",
                            "runs",
                            "environments",
                            "rules",
                            "reportNames",
                            "credentials",
                            "testUsers",
                            "authTargets"
                          ],
                          "additionalProperties": false
                        },
                        "repo": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "outcome": {
                                  "type": "string",
                                  "const": "none"
                                }
                              },
                              "required": [
                                "outcome"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "outcome": {
                                  "type": "string",
                                  "const": "transfer"
                                },
                                "repositoryId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "outcome",
                                "repositoryId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "outcome": {
                                  "type": "string",
                                  "const": "same_repo"
                                },
                                "redundantBindingDropped": {
                                  "type": "boolean",
                                  "const": true
                                }
                              },
                              "required": [
                                "outcome",
                                "redundantBindingDropped"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "source",
                        "into",
                        "moves",
                        "repo"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      }
    },
    "/v1/projects/{projectId}/repo": {
      "post": {
        "summary": "Link a repository to this project",
        "description": "`repositoryId` is the PROVIDER's stable id — not a URL and not `owner/name`. `GET /v1/repositories` lists the ones we can see.\n\nA project holds at most one repository. Linking over an existing link is 409 `repo_already_linked` and names the current one. If the repository already holds report-name reservations that clash with this project's rules, it is 409 `report_name_taken` with every conflict in `details.conflicts`.",
        "operationId": "postV1ProjectsProjectIdRepo",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "github",
                      "bitbucket",
                      "gitlab"
                    ]
                  },
                  "repositoryId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  }
                },
                "required": [
                  "provider",
                  "repositoryId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Re-linked a repository this project had before.",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "provider": {
                          "type": "string",
                          "enum": [
                            "github",
                            "bitbucket"
                          ]
                        },
                        "repositoryId": {
                          "type": "string"
                        },
                        "linkedByUserId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "linkedBy": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "userId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "userId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "apiKeyId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "apiKeyId"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "linkedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "provider",
                        "repositoryId",
                        "linkedByUserId",
                        "linkedBy",
                        "linkedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Linked for the first time.",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "provider": {
                          "type": "string",
                          "enum": [
                            "github",
                            "bitbucket"
                          ]
                        },
                        "repositoryId": {
                          "type": "string"
                        },
                        "linkedByUserId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "linkedBy": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "userId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "userId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "apiKeyId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "apiKeyId"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "linkedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "provider",
                        "repositoryId",
                        "linkedByUserId",
                        "linkedBy",
                        "linkedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The repository identity could not be verified (`identity_unverifiable`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      },
      "delete": {
        "summary": "Unlink this project's repository",
        "operationId": "deleteV1ProjectsProjectIdRepo",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Unlink this project's repository",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The request id. On a 204 this is the ONLY place it appears — there is no body to carry `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/projects/{projectId}/restore": {
      "post": {
        "summary": "Restore an archived project",
        "operationId": "postV1ProjectsProjectIdRestore",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Restore an archived project",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdByUserId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "createdVia": {
                          "type": "string",
                          "enum": [
                            "desktop",
                            "cli",
                            "api",
                            "migration"
                          ]
                        },
                        "mergedInto": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Set when this project was merged away. Reads follow it to the survivor, so the `id` you get back can differ from the one you asked for."
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "repo": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "github",
                                    "bitbucket"
                                  ]
                                },
                                "repositoryId": {
                                  "type": "string"
                                },
                                "fullName": {
                                  "type": "string"
                                },
                                "linkedByUserId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "linkedBy": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "userId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "userId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "apiKeyId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "apiKeyId"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "linkedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "provider",
                                "repositoryId",
                                "fullName",
                                "linkedByUserId",
                                "linkedBy",
                                "linkedAt"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "tests": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "groups": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "tests",
                            "groups"
                          ],
                          "additionalProperties": false
                        },
                        "lastRunAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "createdByUserId",
                        "createdAt",
                        "updatedAt",
                        "createdVia",
                        "mergedInto",
                        "archivedAt",
                        "repo",
                        "counts",
                        "lastRunAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/projects/{projectId}/rules": {
      "get": {
        "summary": "List a project's trigger rules",
        "operationId": "getV1ProjectsProjectIdRules",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List a project's trigger rules",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ruleId": {
                            "type": "string"
                          },
                          "projectId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "when": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "deployment"
                                  },
                                  "match": {
                                    "type": "object",
                                    "properties": {
                                      "branch": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "requiresPullRequest": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "branch",
                                      "source",
                                      "requiresPullRequest"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "type",
                                  "match"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "schedule"
                                  },
                                  "cron": {
                                    "type": "string"
                                  },
                                  "timezone": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "cron",
                                  "timezone"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "webhook"
                                  },
                                  "prefix": {
                                    "type": "string",
                                    "description": "The first characters of the hook token, enough to recognise which rule a delivery came from in a log. NOT the URL — the full URL is returned once, on create, and never again."
                                  },
                                  "lastUsedAt": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": -9007199254740991,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "prefix",
                                  "lastUsedAt"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "run": {
                            "type": "object",
                            "properties": {
                              "groupIds": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "explorationEnabled": {
                                "type": "boolean",
                                "description": "Whether the run also explores beyond its written tests, looking for problems nobody wrote a test for. Off unless asked for."
                              }
                            },
                            "required": [
                              "groupIds",
                              "explorationEnabled"
                            ],
                            "additionalProperties": false
                          },
                          "against": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The environment this rule's runs open in, replacing each group's own. Null inherits the group's."
                          },
                          "checkRunsEnabled": {
                            "type": "boolean"
                          },
                          "canAttributeRuns": {
                            "type": "boolean"
                          },
                          "canStartRuns": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "ruleId",
                          "projectId",
                          "name",
                          "enabled",
                          "when",
                          "run",
                          "against",
                          "checkRunsEnabled",
                          "canAttributeRuns",
                          "canStartRuns",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      },
      "post": {
        "summary": "Create a trigger rule",
        "description": "A rule is what runs QA without anyone asking — on a webhook delivery, a deployment, or a schedule.\n\nIt is also the ONLY path that reports a check back onto a pull request: check names are reserved per repository by the rule that owns them, so a check from CI comes from a rule's webhook and not from starting a run directly. A webhook rule's response carries the `POST /v1/hooks/{token}` URL to give your CI host.",
        "operationId": "postV1ProjectsProjectIdRules",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "when": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "deployment"
                          },
                          "match": {
                            "default": {
                              "branch": null,
                              "source": null,
                              "requiresPullRequest": true
                            },
                            "type": "object",
                            "properties": {
                              "branch": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "source": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "requiresPullRequest": {
                                "default": true,
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "schedule"
                          },
                          "cron": {
                            "type": "string",
                            "minLength": 1
                          },
                          "timezone": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "type",
                          "cron",
                          "timezone"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "webhook"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ]
                  },
                  "run": {
                    "type": "object",
                    "properties": {
                      "groupIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "explorationEnabled": {
                        "default": false,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "groupIds"
                    ]
                  },
                  "against": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "checkRunsEnabled": {
                    "default": false,
                    "type": "boolean"
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "when",
                  "run"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a trigger rule",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "ruleId": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "when": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "deployment"
                                },
                                "match": {
                                  "type": "object",
                                  "properties": {
                                    "branch": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "source": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "requiresPullRequest": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "branch",
                                    "source",
                                    "requiresPullRequest"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "type",
                                "match"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "schedule"
                                },
                                "cron": {
                                  "type": "string"
                                },
                                "timezone": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "cron",
                                "timezone"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "webhook"
                                },
                                "prefix": {
                                  "type": "string",
                                  "description": "The first characters of the hook token, enough to recognise which rule a delivery came from in a log. NOT the URL — the full URL is returned once, on create, and never again."
                                },
                                "lastUsedAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "prefix",
                                "lastUsedAt"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "run": {
                          "type": "object",
                          "properties": {
                            "groupIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "explorationEnabled": {
                              "type": "boolean",
                              "description": "Whether the run also explores beyond its written tests, looking for problems nobody wrote a test for. Off unless asked for."
                            }
                          },
                          "required": [
                            "groupIds",
                            "explorationEnabled"
                          ],
                          "additionalProperties": false
                        },
                        "against": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The environment this rule's runs open in, replacing each group's own. Null inherits the group's."
                        },
                        "checkRunsEnabled": {
                          "type": "boolean"
                        },
                        "canAttributeRuns": {
                          "type": "boolean"
                        },
                        "canStartRuns": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "url": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ruleId",
                        "projectId",
                        "name",
                        "enabled",
                        "when",
                        "run",
                        "against",
                        "checkRunsEnabled",
                        "canAttributeRuns",
                        "canStartRuns",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/projects/{projectId}/skips": {
      "get": {
        "summary": "List skipped rule triggers",
        "description": "Why a rule that should have fired did not — the record that turns \"QA never ran\" from a mystery into an answer.\n\n**Skips are kept for 30 days.** They carry a Firestore TTL, so an empty list means nothing was skipped IN THAT WINDOW — it does not mean nothing was ever skipped. A rule that declined to fire 31 days ago is indistinguishable from one that never declined at all.",
        "operationId": "getV1ProjectsProjectIdSkips",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ruleId",
            "in": "query",
            "required": false,
            "description": "Only skips recorded for this rule.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List skipped rule triggers",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "skipId": {
                            "type": "string"
                          },
                          "ruleId": {
                            "type": "string"
                          },
                          "projectId": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "rule_disabled",
                              "project_not_active",
                              "no_attributable_actor",
                              "out_of_scope",
                              "no_target_url",
                              "no_target_build",
                              "target_build_unavailable",
                              "no_runnable_tests",
                              "insufficient_credits",
                              "actor_lost_access",
                              "exploration_needs_pull_request",
                              "exploration_environment_conflict"
                            ]
                          },
                          "trigger": {
                            "type": "string",
                            "enum": [
                              "deployment",
                              "webhook",
                              "schedule"
                            ]
                          },
                          "targetHost": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "groupIds": {
                            "anyOf": [
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "event": {
                            "type": "object",
                            "properties": {
                              "deliveryId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "headSha": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "prUrl": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "baseBranch": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "deliveryId",
                              "headSha",
                              "prUrl",
                              "baseBranch"
                            ],
                            "additionalProperties": false
                          },
                          "at": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "skipId",
                          "ruleId",
                          "projectId",
                          "reason",
                          "trigger",
                          "targetHost",
                          "groupIds",
                          "event",
                          "at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      }
    },
    "/v1/projects/{projectId}/tests": {
      "get": {
        "summary": "List a project's tests",
        "operationId": "getV1ProjectsProjectIdTests",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Only tests whose title or description contains this text, case-insensitively.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupId",
            "in": "query",
            "required": false,
            "description": "Only this group's tests.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List a project's tests",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "projectId": {
                            "type": "string"
                          },
                          "groupId": {
                            "type": "string"
                          },
                          "title": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "description": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "target": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "static_url"
                                  },
                                  "url": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "deployment_url"
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "mobile_app"
                                  },
                                  "platform": {
                                    "type": "string",
                                    "enum": [
                                      "android",
                                      "ios"
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "platform"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "trigger": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "manual",
                                  "github_deployment"
                                ]
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "archivedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "projectId",
                          "groupId",
                          "title",
                          "description",
                          "target",
                          "trigger",
                          "createdAt",
                          "updatedAt",
                          "archivedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      },
      "post": {
        "summary": "Create a test",
        "description": "A test targets exactly one of: a fixed URL (`static_url`), the linked repository's deployments (`deployment_url` — link a repository first), or a mobile app (`mobile_app`).",
        "operationId": "postV1ProjectsProjectIdTests",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The projectId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "title": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "target": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "static_url"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "required": [
                          "type",
                          "url"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "deployment_url"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "mobile_app"
                          },
                          "platform": {
                            "type": "string",
                            "enum": [
                              "android",
                              "ios"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "platform"
                        ]
                      }
                    ]
                  },
                  "targetUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "groupId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "description"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a test",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "groupId": {
                          "type": "string"
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "target": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "static_url"
                                },
                                "url": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "url"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "deployment_url"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "mobile_app"
                                },
                                "platform": {
                                  "type": "string",
                                  "enum": [
                                    "android",
                                    "ios"
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "platform"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "trigger": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "manual",
                                "github_deployment"
                              ]
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "groupId",
                        "title",
                        "description",
                        "target",
                        "trigger",
                        "createdAt",
                        "updatedAt",
                        "archivedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/projects": {
      "get": {
        "summary": "List projects",
        "operationId": "getV1Projects",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "in": "query",
            "required": false,
            "description": "`true` to include archived projects. Defaults to `false`. Anything else is a `400 invalid_request`.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List projects",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "createdByUserId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "createdVia": {
                            "type": "string",
                            "enum": [
                              "desktop",
                              "cli",
                              "api",
                              "migration"
                            ]
                          },
                          "mergedInto": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Set when this project was merged away. Reads follow it to the survivor, so the `id` you get back can differ from the one you asked for."
                          },
                          "archivedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "repo": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "github",
                                      "bitbucket"
                                    ]
                                  },
                                  "repositoryId": {
                                    "type": "string"
                                  },
                                  "fullName": {
                                    "type": "string"
                                  },
                                  "linkedByUserId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "linkedBy": {
                                    "anyOf": [
                                      {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "userId": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "userId"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "apiKeyId": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "apiKeyId"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "linkedAt": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  }
                                },
                                "required": [
                                  "provider",
                                  "repositoryId",
                                  "fullName",
                                  "linkedByUserId",
                                  "linkedBy",
                                  "linkedAt"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "counts": {
                            "type": "object",
                            "properties": {
                              "tests": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "groups": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "tests",
                              "groups"
                            ],
                            "additionalProperties": false
                          },
                          "lastRunAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "createdByUserId",
                          "createdAt",
                          "updatedAt",
                          "createdVia",
                          "mergedInto",
                          "archivedAt",
                          "repo",
                          "counts",
                          "lastRunAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      },
      "post": {
        "summary": "Create a project",
        "operationId": "postV1Projects",
        "tags": [
          "projects"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "clientRequestId": {
                    "type": "string",
                    "pattern": "^mqcr_[A-Za-z0-9_-]+$"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a project",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdByUserId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "createdVia": {
                          "type": "string",
                          "enum": [
                            "desktop",
                            "cli",
                            "api",
                            "migration"
                          ]
                        },
                        "mergedInto": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Set when this project was merged away. Reads follow it to the survivor, so the `id` you get back can differ from the one you asked for."
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "repo": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "github",
                                    "bitbucket"
                                  ]
                                },
                                "repositoryId": {
                                  "type": "string"
                                },
                                "fullName": {
                                  "type": "string"
                                },
                                "linkedByUserId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "linkedBy": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "userId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "userId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "apiKeyId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "apiKeyId"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "linkedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "provider",
                                "repositoryId",
                                "fullName",
                                "linkedByUserId",
                                "linkedBy",
                                "linkedAt"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "tests": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "groups": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "tests",
                            "groups"
                          ],
                          "additionalProperties": false
                        },
                        "lastRunAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "createdByUserId",
                        "createdAt",
                        "updatedAt",
                        "createdVia",
                        "mergedInto",
                        "archivedAt",
                        "repo",
                        "counts",
                        "lastRunAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/projects/lookup": {
      "get": {
        "summary": "Find projects by repository",
        "description": "Which projects are linked to a given repository. The way a CI job that knows only its own repository finds the project to run against. Returns a LIST — a repository can be linked from more than one project, so a caller that reads `data` as a single object breaks on the second one.",
        "operationId": "getV1ProjectsLookup",
        "tags": [
          "projects"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "required": true,
            "description": "`github` or `bitbucket`.",
            "schema": {
              "type": "string",
              "enum": [
                "github",
                "bitbucket"
              ]
            }
          },
          {
            "name": "repositoryId",
            "in": "query",
            "required": true,
            "description": "The provider's stable repository id — not a URL and not `owner/name`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Find projects by repository",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "repo": {
                            "type": "object",
                            "properties": {
                              "provider": {
                                "type": "string",
                                "enum": [
                                  "github",
                                  "bitbucket"
                                ]
                              },
                              "repositoryId": {
                                "type": "string"
                              },
                              "linkedByUserId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "linkedBy": {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "userId": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "userId"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "apiKeyId": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "apiKeyId"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "linkedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "provider",
                              "repositoryId",
                              "linkedByUserId",
                              "linkedBy",
                              "linkedAt"
                            ],
                            "additionalProperties": false
                          },
                          "counts": {
                            "type": "object",
                            "properties": {
                              "tests": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "groups": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "tests",
                              "groups"
                            ],
                            "additionalProperties": false
                          },
                          "lastRunAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "repo",
                          "counts",
                          "lastRunAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      }
    },
    "/v1/repositories": {
      "get": {
        "summary": "List connected repositories",
        "description": "The repositories our GitHub App or Bitbucket install can see, with the provider ids that `POST /v1/projects/{projectId}/repo` wants.",
        "operationId": "getV1Repositories",
        "tags": [
          "repositories"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List connected repositories",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string",
                            "enum": [
                              "github",
                              "bitbucket"
                            ]
                          },
                          "repositoryId": {
                            "type": "string"
                          },
                          "fullName": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "owner": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "provider",
                          "repositoryId",
                          "fullName",
                          "name",
                          "owner"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The repository identity could not be verified (`identity_unverifiable`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      }
    },
    "/v1/rules/{ruleId}": {
      "patch": {
        "summary": "Update a trigger rule",
        "operationId": "patchV1RulesRuleId",
        "tags": [
          "rules"
        ],
        "parameters": [
          {
            "name": "ruleId",
            "in": "path",
            "required": true,
            "description": "The ruleId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "when": {
                    "type": "object",
                    "properties": {
                      "match": {
                        "type": "object",
                        "properties": {
                          "branch": {
                            "default": null,
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "source": {
                            "default": null,
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "requiresPullRequest": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      },
                      "cron": {
                        "type": "string",
                        "minLength": 1
                      },
                      "timezone": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "additionalProperties": false
                  },
                  "run": {
                    "type": "object",
                    "properties": {
                      "groupIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "explorationEnabled": {
                        "default": false,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "groupIds"
                    ]
                  },
                  "against": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "checkRunsEnabled": {
                    "type": "boolean"
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update a trigger rule",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "ruleId": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "when": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "deployment"
                                },
                                "match": {
                                  "type": "object",
                                  "properties": {
                                    "branch": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "source": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "requiresPullRequest": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "branch",
                                    "source",
                                    "requiresPullRequest"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "type",
                                "match"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "schedule"
                                },
                                "cron": {
                                  "type": "string"
                                },
                                "timezone": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "cron",
                                "timezone"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "webhook"
                                },
                                "prefix": {
                                  "type": "string",
                                  "description": "The first characters of the hook token, enough to recognise which rule a delivery came from in a log. NOT the URL — the full URL is returned once, on create, and never again."
                                },
                                "lastUsedAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "prefix",
                                "lastUsedAt"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "run": {
                          "type": "object",
                          "properties": {
                            "groupIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "explorationEnabled": {
                              "type": "boolean",
                              "description": "Whether the run also explores beyond its written tests, looking for problems nobody wrote a test for. Off unless asked for."
                            }
                          },
                          "required": [
                            "groupIds",
                            "explorationEnabled"
                          ],
                          "additionalProperties": false
                        },
                        "against": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The environment this rule's runs open in, replacing each group's own. Null inherits the group's."
                        },
                        "checkRunsEnabled": {
                          "type": "boolean"
                        },
                        "canAttributeRuns": {
                          "type": "boolean"
                        },
                        "canStartRuns": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "ruleId",
                        "projectId",
                        "name",
                        "enabled",
                        "when",
                        "run",
                        "against",
                        "checkRunsEnabled",
                        "canAttributeRuns",
                        "canStartRuns",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      },
      "delete": {
        "summary": "Delete a trigger rule",
        "description": "Releases the report name it reserved on the repository, which is what frees that name for another project.",
        "operationId": "deleteV1RulesRuleId",
        "tags": [
          "rules"
        ],
        "parameters": [
          {
            "name": "ruleId",
            "in": "path",
            "required": true,
            "description": "The ruleId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Delete a trigger rule",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The request id. On a 204 this is the ONLY place it appears — there is no body to carry `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/runs/{runId}/console": {
      "get": {
        "summary": "Read a run's console output",
        "description": "What the browser logged while the run was happening. The first place to look when a run could not verify something.",
        "operationId": "getV1RunsRunIdConsole",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "description": "The runId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read a run's console output",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "at": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "level": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          },
                          "args": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "url": {
                            "type": "string"
                          },
                          "stack": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "truncated": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "at",
                          "level",
                          "text",
                          "args",
                          "url",
                          "stack",
                          "truncated"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      }
    },
    "/v1/runs/{runId}": {
      "get": {
        "summary": "Get a run",
        "description": "**Read `outcome`, not `status`.** A run that abstained has `status: \"failed\"` with `verdict: null` and `outcome: \"couldnt_verify\"` — branching on `status` reports a broken app when nothing was broken.\n\n`reportUrl` and `liveViewUrl` are both derived from the run id and outlive the run: the live page shows the browser while the run is in progress (view-only; there is no control mode), and once the run ends it says so and links to the report.",
        "operationId": "getV1RunsRunId",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "description": "The runId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get a run",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "testId": {
                          "type": "string"
                        },
                        "groupId": {
                          "type": "string"
                        },
                        "batchId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "label": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "testDescription": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "manual_url",
                            "deployment",
                            "pr_build",
                            "webhook",
                            "schedule"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued",
                            "running",
                            "waiting",
                            "stopping",
                            "completed",
                            "failed",
                            "canceled"
                          ],
                          "description": "Do NOT branch on this. A run that could not reach a verdict reports `status: \"failed\"` with `outcome: \"couldnt_verify\"`, so reading status calls an app broken when nothing was. Read `outcome`."
                        },
                        "verdict": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "pass",
                                "fail",
                                "warning"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "runIssue": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "message"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "outcome": {
                          "type": "string",
                          "enum": [
                            "in_progress",
                            "passed",
                            "failed",
                            "warning",
                            "couldnt_verify",
                            "couldnt_run"
                          ],
                          "description": "THE FIELD TO BRANCH ON. `in_progress` is the only non-terminal value: every other one means the run is over and will not change. Poll until this is not `in_progress`."
                        },
                        "runtimeWaiting": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "message"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "targetUrl": {
                          "type": "string"
                        },
                        "prUrl": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "headSha": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "repo": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "const": "github"
                                },
                                "id": {
                                  "type": "string"
                                },
                                "owner": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "provider",
                                "id",
                                "owner",
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "runAs": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "anonymous"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "test_user"
                                },
                                "testUserId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "testUserId"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "createdByUserId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdBy": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "userId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "userId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "apiKeyId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "apiKeyId"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "liveViewUrl": {
                          "type": "string",
                          "description": "The run's live page: watch the browser while the run is in progress. It is view-only; there is no control mode. Once the run ends the page says so and links to the report. Derived from the run id and never null."
                        },
                        "reportUrl": {
                          "type": "string",
                          "description": "The run's permanent page. Derived from the run id and never null — this is the link to put in a CI log."
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "failedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "cancelRequestedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "canceledAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "canceledByUserId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "canceledBy": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "userId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "userId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "apiKeyId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "apiKeyId"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "summary": {
                          "type": "string"
                        },
                        "video": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "url",
                                "label"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "evidence": {
                          "type": "object",
                          "properties": {
                            "screenshots": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "mimeType": {
                                    "type": "string"
                                  },
                                  "sizeBytes": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "createdAt": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "stepId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "url",
                                  "mimeType",
                                  "sizeBytes",
                                  "createdAt",
                                  "stepId"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "logs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "mimeType": {
                                    "type": "string"
                                  },
                                  "sizeBytes": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "createdAt": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "stepId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "lineCount": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "url",
                                  "mimeType",
                                  "sizeBytes",
                                  "createdAt",
                                  "stepId",
                                  "lineCount"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "replay": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "mimeType": {
                                      "type": "string"
                                    },
                                    "sizeBytes": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "createdAt": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "stepId": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "frameCount": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "durationSeconds": {
                                      "type": "number"
                                    },
                                    "fps": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "label",
                                    "url",
                                    "mimeType",
                                    "sizeBytes",
                                    "createdAt",
                                    "stepId",
                                    "frameCount",
                                    "durationSeconds",
                                    "fps"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "screenshots",
                            "logs",
                            "replay"
                          ],
                          "additionalProperties": false
                        },
                        "steps": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "observation": {
                                "type": "string"
                              },
                              "videoTimeSeconds": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "status",
                              "observation",
                              "videoTimeSeconds"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "testId",
                        "groupId",
                        "batchId",
                        "label",
                        "testDescription",
                        "source",
                        "status",
                        "verdict",
                        "runIssue",
                        "outcome",
                        "runtimeWaiting",
                        "targetUrl",
                        "prUrl",
                        "headSha",
                        "repo",
                        "runAs",
                        "createdByUserId",
                        "createdBy",
                        "liveViewUrl",
                        "reportUrl",
                        "createdAt",
                        "updatedAt",
                        "completedAt",
                        "failedAt",
                        "cancelRequestedAt",
                        "canceledAt",
                        "canceledByUserId",
                        "canceledBy",
                        "summary",
                        "video",
                        "evidence",
                        "steps"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      }
    },
    "/v1/runs/{runId}/stop": {
      "post": {
        "summary": "Stop a run",
        "description": "Asks the run to stop. A run still going answers 202 and moves to `stopping`, reaching a terminal status shortly after. A run that has already settled answers 200 and nothing changes, so stopping twice is safe.",
        "operationId": "postV1RunsRunIdStop",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "description": "The runId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The run had already reached a terminal status.",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "runId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued",
                            "running",
                            "waiting",
                            "stopping",
                            "completed",
                            "failed",
                            "canceled"
                          ]
                        }
                      },
                      "required": [
                        "runId",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "Stop requested; the run moves to `stopping`.",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "runId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued",
                            "running",
                            "waiting",
                            "stopping",
                            "completed",
                            "failed",
                            "canceled"
                          ]
                        }
                      },
                      "required": [
                        "runId",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:run"
            ]
          }
        ]
      }
    },
    "/v1/runs": {
      "get": {
        "summary": "List runs",
        "description": "Newest first. At most ONE scope — `projectId`, `testId`, `groupId` or `batchId` — and with no scope at all, the whole organization's runs.",
        "operationId": "getV1Runs",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "description": "Runs in one project. At most one scope may be given.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "testId",
            "in": "query",
            "required": false,
            "description": "One test's runs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupId",
            "in": "query",
            "required": false,
            "description": "One group's runs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "batchId",
            "in": "query",
            "required": false,
            "description": "One batch's runs. How a caller follows a group start it just made.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Comma-separated. Prefer filtering on `outcome`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "required": false,
            "description": "Comma-separated: in_progress, passed, failed, warning, couldnt_verify, couldnt_run. The field to filter on — `status` reads an abstention as a failure.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environmentId",
            "in": "query",
            "required": false,
            "description": "Only runs that opened in this environment. Combines with any scope; filtered pages may hold fewer than `limit` rows and still have a next page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only runs created at or after this epoch-milliseconds moment.",
            "schema": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List runs",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "projectId": {
                            "type": "string"
                          },
                          "testId": {
                            "type": "string"
                          },
                          "groupId": {
                            "type": "string"
                          },
                          "batchId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "label": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "testDescription": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "manual_url",
                              "deployment",
                              "pr_build",
                              "webhook",
                              "schedule"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "queued",
                              "running",
                              "waiting",
                              "stopping",
                              "completed",
                              "failed",
                              "canceled"
                            ],
                            "description": "Do NOT branch on this. A run that could not reach a verdict reports `status: \"failed\"` with `outcome: \"couldnt_verify\"`, so reading status calls an app broken when nothing was. Read `outcome`."
                          },
                          "verdict": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "pass",
                                  "fail",
                                  "warning"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "runIssue": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "message"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "outcome": {
                            "type": "string",
                            "enum": [
                              "in_progress",
                              "passed",
                              "failed",
                              "warning",
                              "couldnt_verify",
                              "couldnt_run"
                            ],
                            "description": "THE FIELD TO BRANCH ON. `in_progress` is the only non-terminal value: every other one means the run is over and will not change. Poll until this is not `in_progress`."
                          },
                          "runtimeWaiting": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "message"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "targetUrl": {
                            "type": "string"
                          },
                          "prUrl": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "headSha": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "repo": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "const": "github"
                                  },
                                  "id": {
                                    "type": "string"
                                  },
                                  "owner": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "id",
                                  "owner",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "runAs": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "anonymous"
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "test_user"
                                  },
                                  "testUserId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "testUserId"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "createdByUserId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdBy": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "userId": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "userId"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "apiKeyId": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "apiKeyId"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "liveViewUrl": {
                            "type": "string",
                            "description": "The run's live page: watch the browser while the run is in progress. It is view-only; there is no control mode. Once the run ends the page says so and links to the report. Derived from the run id and never null."
                          },
                          "reportUrl": {
                            "type": "string",
                            "description": "The run's permanent page. Derived from the run id and never null — this is the link to put in a CI log."
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "completedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "failedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cancelRequestedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "canceledAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "canceledByUserId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "canceledBy": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "userId": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "userId"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "apiKeyId": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "apiKeyId"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "projectId",
                          "testId",
                          "groupId",
                          "batchId",
                          "label",
                          "testDescription",
                          "source",
                          "status",
                          "verdict",
                          "runIssue",
                          "outcome",
                          "runtimeWaiting",
                          "targetUrl",
                          "prUrl",
                          "headSha",
                          "repo",
                          "runAs",
                          "createdByUserId",
                          "createdBy",
                          "liveViewUrl",
                          "reportUrl",
                          "createdAt",
                          "updatedAt",
                          "completedAt",
                          "failedAt",
                          "cancelRequestedAt",
                          "canceledAt",
                          "canceledByUserId",
                          "canceledBy"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      }
    },
    "/v1/tasks/{taskId}": {
      "get": {
        "summary": "Show one task",
        "description": "Accepts either the readable identifier (`BLU-1`) or the canonical task id.\n\nPass `include=description` for the full body as Markdown; without it only `descriptionPreview` (280 characters) is returned.\n\nPass `expand=workflowState` to have the state's name and type resolved alongside its id.",
        "operationId": "getV1TasksTaskId",
        "tags": [
          "tasks"
        ],
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "description": "The taskId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "`description` to include the full body as Markdown. Omit for none.",
            "schema": {
              "type": "string",
              "const": "description"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "`workflowState` to resolve the state's name and type, computed fresh.",
            "schema": {
              "type": "string",
              "const": "workflowState"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Show one task",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "identifier": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "teamId": {
                          "type": "string"
                        },
                        "workflowStateId": {
                          "type": "string"
                        },
                        "priority": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "assigneeId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "parentId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "labelIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "projectId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "dueDate": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "estimate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "descriptionPreview": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "coldtea",
                            "linear",
                            "jira",
                            "github"
                          ]
                        },
                        "number": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "canceledAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "workflowState": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "triage",
                                "backlog",
                                "unstarted",
                                "started",
                                "completed",
                                "canceled",
                                "duplicate"
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "type"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "identifier",
                        "title",
                        "teamId",
                        "workflowStateId",
                        "priority",
                        "assigneeId",
                        "parentId",
                        "labelIds",
                        "projectId",
                        "dueDate",
                        "estimate",
                        "descriptionPreview",
                        "origin",
                        "number",
                        "createdAt",
                        "updatedAt",
                        "completedAt",
                        "canceledAt",
                        "archivedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "tasks:read"
            ]
          }
        ]
      },
      "patch": {
        "summary": "Change a task",
        "description": "Only the fields you send change; everything else is left alone.\n\nPass `expectedUpdatedAt` — the `updatedAt` you last read — to be refused with `409 task_changed` if somebody else wrote to the task in between, rather than applying your change over theirs.\n\n`assigneeId` takes a user id from `GET /v1/teams/{teamId}/members`; `null` clears the assignee.",
        "operationId": "patchV1TasksTaskId",
        "tags": [
          "tasks"
        ],
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "description": "The taskId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "description": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "$ref": "#/$defs/__schema0"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "priority": {
                    "anyOf": [
                      {
                        "type": "number",
                        "const": 0
                      },
                      {
                        "type": "number",
                        "const": 1
                      },
                      {
                        "type": "number",
                        "const": 2
                      },
                      {
                        "type": "number",
                        "const": 3
                      },
                      {
                        "type": "number",
                        "const": 4
                      }
                    ]
                  },
                  "workflowStateId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "estimate": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "assigneeId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "expectedUpdatedAt": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "dueDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false,
                "$defs": {
                  "__schema0": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "attrs": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "marks": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            },
                            "attrs": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "type"
                          ]
                        }
                      },
                      "content": {
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/__schema0"
                        }
                      },
                      "text": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Change a task",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "identifier": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "teamId": {
                          "type": "string"
                        },
                        "workflowStateId": {
                          "type": "string"
                        },
                        "priority": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "assigneeId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "parentId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "labelIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "projectId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "dueDate": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "estimate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "descriptionPreview": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "coldtea",
                            "linear",
                            "jira",
                            "github"
                          ]
                        },
                        "number": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "canceledAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "workflowState": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "triage",
                                "backlog",
                                "unstarted",
                                "started",
                                "completed",
                                "canceled",
                                "duplicate"
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "type"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "identifier",
                        "title",
                        "teamId",
                        "workflowStateId",
                        "priority",
                        "assigneeId",
                        "parentId",
                        "labelIds",
                        "projectId",
                        "dueDate",
                        "estimate",
                        "descriptionPreview",
                        "origin",
                        "number",
                        "createdAt",
                        "updatedAt",
                        "completedAt",
                        "canceledAt",
                        "archivedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "tasks:write"
            ]
          }
        ]
      },
      "delete": {
        "summary": "Delete a task",
        "description": "A soft delete: the task stops appearing anywhere and its attachments are cleaned up in the background. Answers with the task as it was, so a caller that wanted a record of what it removed has one.",
        "operationId": "deleteV1TasksTaskId",
        "tags": [
          "tasks"
        ],
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "description": "The taskId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete a task",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "identifier": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "teamId": {
                          "type": "string"
                        },
                        "workflowStateId": {
                          "type": "string"
                        },
                        "priority": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "assigneeId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "parentId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "labelIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "projectId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "dueDate": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "estimate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "descriptionPreview": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "coldtea",
                            "linear",
                            "jira",
                            "github"
                          ]
                        },
                        "number": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "canceledAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "workflowState": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "triage",
                                "backlog",
                                "unstarted",
                                "started",
                                "completed",
                                "canceled",
                                "duplicate"
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "type"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "identifier",
                        "title",
                        "teamId",
                        "workflowStateId",
                        "priority",
                        "assigneeId",
                        "parentId",
                        "labelIds",
                        "projectId",
                        "dueDate",
                        "estimate",
                        "descriptionPreview",
                        "origin",
                        "number",
                        "createdAt",
                        "updatedAt",
                        "completedAt",
                        "canceledAt",
                        "archivedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "tasks:write"
            ]
          }
        ]
      }
    },
    "/v1/tasks/{taskId}/move": {
      "patch": {
        "summary": "Move a task to a column",
        "description": "Moves the task into `workflowStateId`, positioned between `previousTaskId` and `nextTaskId`. Omit both to land at the column's default end.\n\n`changedTasks` lists every task whose board position changed, INCLUDING the one you moved, so a caller mirroring a board can apply the whole list without re-reading. `movedTask` points at which of them the request was about.",
        "operationId": "patchV1TasksTaskIdMove",
        "tags": [
          "tasks"
        ],
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "description": "The taskId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workflowStateId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "previousTaskId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "nextTaskId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "workflowStateId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Move a task to a column",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "movedTask": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "workflowStateId": {
                              "type": "string"
                            },
                            "boardSortOrder": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "id",
                            "workflowStateId",
                            "boardSortOrder"
                          ],
                          "additionalProperties": false
                        },
                        "changedTasks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "workflowStateId": {
                                "type": "string"
                              },
                              "boardSortOrder": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "workflowStateId",
                              "boardSortOrder"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "movedTask",
                        "changedTasks"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "tasks:write"
            ]
          }
        ]
      }
    },
    "/v1/tasks": {
      "get": {
        "summary": "List tasks",
        "description": "The TeaHouse's tasks, newest first. Archived and deleted tasks are absent rather than flagged.\n\nPage by copying `meta.nextCursor` into `cursor` until it is null — never by counting rows. A page may hold fewer than `limit` results and still have a next page — filtered listings especially, since `label` (beyond the first), `q`, `updatedSince`, `stateType` and `parentId` narrow each page after it is read.",
        "operationId": "getV1Tasks",
        "tags": [
          "tasks"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "teamId",
            "in": "query",
            "required": false,
            "description": "Only this board's tasks (`teamId` is the board id).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workflowStateId",
            "in": "query",
            "required": false,
            "description": "Only tasks in this workflow state.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assigneeId",
            "in": "query",
            "required": false,
            "description": "Only tasks assigned to this user.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "priority",
            "in": "query",
            "required": false,
            "description": "Only tasks at this priority: 0 none, 1 urgent, 2 high, 3 medium, 4 low.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "description": "Labels the task must carry — ALL of them (repeats COMBINE as AND). Each value is a label id, or a label NAME matched case-insensitively across every board. Sent as a repeated parameter: ?label=monitoring&label=urgent.",
            "schema": {
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Only tasks whose title contains this text, case-insensitively.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "description": "Only tasks whose updatedAt is at or after this epoch-milliseconds instant.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "stateType",
            "in": "query",
            "required": false,
            "description": "Only tasks in a workflow state of this TYPE — triage, backlog, unstarted, started, completed, canceled or duplicate. The test for meaning: a board may hold several states of one type, and per-board state ids don't work across a TeaHouse.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parentId",
            "in": "query",
            "required": false,
            "description": "Only subtasks of this task.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List tasks",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "identifier": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "teamId": {
                            "type": "string"
                          },
                          "workflowStateId": {
                            "type": "string"
                          },
                          "priority": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "assigneeId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "parentId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "labelIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "projectId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dueDate": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "estimate": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "descriptionPreview": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "origin": {
                            "type": "string",
                            "enum": [
                              "coldtea",
                              "linear",
                              "jira",
                              "github"
                            ]
                          },
                          "number": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "completedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "canceledAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "archivedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "description": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "workflowState": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "triage",
                                  "backlog",
                                  "unstarted",
                                  "started",
                                  "completed",
                                  "canceled",
                                  "duplicate"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "type"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "identifier",
                          "title",
                          "teamId",
                          "workflowStateId",
                          "priority",
                          "assigneeId",
                          "parentId",
                          "labelIds",
                          "projectId",
                          "dueDate",
                          "estimate",
                          "descriptionPreview",
                          "origin",
                          "number",
                          "createdAt",
                          "updatedAt",
                          "completedAt",
                          "canceledAt",
                          "archivedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "tasks:read"
            ]
          }
        ]
      },
      "post": {
        "summary": "Create a task",
        "description": "The task is created in the TeaHouse the API key belongs to, and the activity feed attributes it to the key by name.\n\nBoth `teamId` and `workflowStateId` may be omitted. `teamId` is the board id. An absent `teamId` means the TeaHouse's only board, or its default board when it has several; it is refused only when there are several and no default. An absent `workflowStateId` means the board's leftmost `unstarted` state (its Todo column), and is refused when the board has no such state.\n\nTo choose explicitly, the ids come from `GET /v1/teams` and `GET /v1/teams/{teamId}/workflow-states`; the workflow state must belong to the board.",
        "operationId": "postV1Tasks",
        "tags": [
          "tasks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "workflowStateId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "description": "Task description. Either a TipTap JSON rich-text object (used by the desktop editor) or a Markdown string (used by agents via MCP). Strings are converted to TipTap JSON server-side.",
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "$ref": "#/$defs/__schema0"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "priority": {
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "number",
                        "const": 0
                      },
                      {
                        "type": "number",
                        "const": 1
                      },
                      {
                        "type": "number",
                        "const": 2
                      },
                      {
                        "type": "number",
                        "const": 3
                      },
                      {
                        "type": "number",
                        "const": 4
                      }
                    ]
                  },
                  "labels": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "estimate": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "teamId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "assigneeId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dueDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false,
                "$defs": {
                  "__schema0": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "attrs": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "marks": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            },
                            "attrs": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "type"
                          ]
                        }
                      },
                      "content": {
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/__schema0"
                        }
                      },
                      "text": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a task",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "identifier": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "teamId": {
                          "type": "string"
                        },
                        "workflowStateId": {
                          "type": "string"
                        },
                        "priority": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "assigneeId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "parentId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "labelIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "projectId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "dueDate": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "estimate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "descriptionPreview": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "coldtea",
                            "linear",
                            "jira",
                            "github"
                          ]
                        },
                        "number": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "canceledAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "workflowState": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "triage",
                                "backlog",
                                "unstarted",
                                "started",
                                "completed",
                                "canceled",
                                "duplicate"
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "type"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "identifier",
                        "title",
                        "teamId",
                        "workflowStateId",
                        "priority",
                        "assigneeId",
                        "parentId",
                        "labelIds",
                        "projectId",
                        "dueDate",
                        "estimate",
                        "descriptionPreview",
                        "origin",
                        "number",
                        "createdAt",
                        "updatedAt",
                        "completedAt",
                        "canceledAt",
                        "archivedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "tasks:write"
            ]
          }
        ]
      }
    },
    "/v1/teams/{teamId}/labels": {
      "get": {
        "summary": "List a board's labels",
        "description": "The labels a task on this board can carry. Pass an `id` to `POST /v1/tasks` or `PATCH /v1/tasks/{taskId}` as `labels`; a label belonging to another board is refused.",
        "operationId": "getV1TeamsTeamIdLabels",
        "tags": [
          "teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "description": "The teamId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List a board's labels",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "color": {
                            "type": "string"
                          },
                          "emoji": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "teamId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color",
                          "emoji",
                          "teamId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "tasks:read"
            ]
          }
        ]
      }
    },
    "/v1/teams/{teamId}/members": {
      "get": {
        "summary": "List a board's members",
        "description": "Who can hold work on this board. Pass a `userId` as `assigneeId` to `POST /v1/tasks` or `PATCH /v1/tasks/{taskId}`.\n\nEmail addresses are deliberately not included: assigning needs the id and recognising a colleague needs the name.",
        "operationId": "getV1TeamsTeamIdMembers",
        "tags": [
          "teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "description": "The teamId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List a board's members",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "avatarUrl": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "userId",
                          "name",
                          "avatarUrl"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "tasks:read"
            ]
          }
        ]
      }
    },
    "/v1/teams/{teamId}/workflow-states": {
      "get": {
        "summary": "List a board's workflow states",
        "description": "The columns of a board, in left-to-right order.\n\nRead `type` to decide what a state MEANS — a board may have several states of the same type, so `type: \"completed\"` is the test for done, not the name. Send `id` when creating or moving a task.",
        "operationId": "getV1TeamsTeamIdWorkflow-states",
        "tags": [
          "teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "description": "The teamId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List a board's workflow states",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "triage",
                              "backlog",
                              "unstarted",
                              "started",
                              "completed",
                              "canceled",
                              "duplicate"
                            ]
                          },
                          "color": {
                            "type": "string"
                          },
                          "teamId": {
                            "type": "string"
                          },
                          "position": {
                            "type": "number"
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "type",
                          "color",
                          "teamId",
                          "position",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "tasks:read"
            ]
          }
        ]
      }
    },
    "/v1/teams": {
      "get": {
        "summary": "List boards",
        "description": "The task boards in your TeaHouse. The API calls a board a team, so a board's `id` is the `teamId` every other endpoint takes. `key` is the prefix in every task identifier the board issues, so `BLU-1` belongs to the board whose key is `BLU`.",
        "operationId": "getV1Teams",
        "tags": [
          "teams"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List boards",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "key": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "id",
                          "key",
                          "name",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "tasks:read"
            ]
          }
        ]
      }
    },
    "/v1/test-users/{testUserId}/auth-targets": {
      "post": {
        "summary": "Add a mobile sign-in to a test user",
        "description": "Mobile accounts can hold several sign-ins — one per platform and app — so this ADDS one to an existing account.\n\nSending the same platform and app matcher again creates ANOTHER target; it does not update the first, and the environment's `identity` goes on naming whichever it already named. To change an existing sign-in, pass its `authTargetId`.\n\nThe recipe is native selectors, no recording step: `identifierField`, `passwordField`, `submit` and `successAssertion.selector` are required, plus `totp.field` when `authMethod` is `password_totp`. Every other slot may be omitted. A missing one is refused by name.\n\nThe answer is the whole account, so a caller sees every sign-in it now has. Secrets are never returned.",
        "operationId": "postV1Test-usersTestUserIdAuth-targets",
        "tags": [
          "test-users"
        ],
        "parameters": [
          {
            "name": "testUserId",
            "in": "path",
            "required": true,
            "description": "The testUserId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "authTargetId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "platform": {
                    "type": "string",
                    "enum": [
                      "android",
                      "ios"
                    ]
                  },
                  "authMethod": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "password"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "password_totp"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ]
                  },
                  "appMatcher": {
                    "type": "object",
                    "properties": {
                      "androidPackageName": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "iosBundleId": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  },
                  "recipe": {
                    "type": "object",
                    "properties": {
                      "entry": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "testId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "accessibilityLabel": {
                                "type": "string",
                                "minLength": 1
                              },
                              "resourceId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "contentDescription": {
                                "type": "string",
                                "minLength": 1
                              },
                              "text": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "identifierField": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "testId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "accessibilityLabel": {
                                "type": "string",
                                "minLength": 1
                              },
                              "resourceId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "contentDescription": {
                                "type": "string",
                                "minLength": 1
                              },
                              "text": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "identifierNext": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "testId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "accessibilityLabel": {
                                "type": "string",
                                "minLength": 1
                              },
                              "resourceId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "contentDescription": {
                                "type": "string",
                                "minLength": 1
                              },
                              "text": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "passwordField": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "testId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "accessibilityLabel": {
                                "type": "string",
                                "minLength": 1
                              },
                              "resourceId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "contentDescription": {
                                "type": "string",
                                "minLength": 1
                              },
                              "text": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "submit": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "testId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "accessibilityLabel": {
                                "type": "string",
                                "minLength": 1
                              },
                              "resourceId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "contentDescription": {
                                "type": "string",
                                "minLength": 1
                              },
                              "text": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "totp": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "field": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "testId": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "accessibilityLabel": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "resourceId": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "contentDescription": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "text": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "submit": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "testId": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "accessibilityLabel": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "resourceId": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "contentDescription": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "text": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "successAssertion": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "selector": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "testId": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "accessibilityLabel": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "resourceId": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "contentDescription": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "text": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "timeoutMs": {
                                "default": 10000,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 120000
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "failureAssertion": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "selector": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "testId": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "accessibilityLabel": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "resourceId": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "contentDescription": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "text": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "timeoutMs": {
                                "default": 10000,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 120000
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  },
                  "credentials": {
                    "type": "object",
                    "properties": {
                      "password": {
                        "type": "string",
                        "minLength": 1
                      },
                      "totpSecret": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "additionalProperties": false
                  },
                  "projectId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "platform",
                  "authMethod",
                  "appMatcher",
                  "recipe"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Add a mobile sign-in to a test user",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "testUserId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "agentDescription": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "loginIdentifier": {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "email"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1,
                                      "format": "email",
                                      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "phone"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "custom"
                                    },
                                    "label": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "label",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "username"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "lifecycleStatus": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "ownerEnvironmentId": {
                          "type": "string"
                        },
                        "authTargets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "authTargetId": {
                                "type": "string"
                              },
                              "surface": {
                                "type": "string",
                                "enum": [
                                  "web",
                                  "mobile"
                                ],
                                "description": "THE FIELD TO BRANCH ON. `platform` is present only on `mobile`."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "failed",
                                  "archived",
                                  "verifying",
                                  "needs_sign_in"
                                ]
                              },
                              "statusReason": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "authMethod": {
                                "anyOf": [
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "sso"
                                          },
                                          "provider": {
                                            "type": "string",
                                            "enum": [
                                              "okta",
                                              "auth0",
                                              "google",
                                              "github",
                                              "microsoft"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "provider"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password_totp"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "matcha_account"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password_totp"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "platform": {
                                "type": "string",
                                "enum": [
                                  "android",
                                  "ios",
                                  "all"
                                ]
                              },
                              "lastVerifiedAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "authTargetId",
                              "surface",
                              "status",
                              "statusReason",
                              "authMethod",
                              "lastVerifiedAt",
                              "createdAt",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "testUserId",
                        "name",
                        "agentDescription",
                        "loginIdentifier",
                        "lifecycleStatus",
                        "authTargets",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/test-users/{testUserId}": {
      "get": {
        "summary": "Get a test user",
        "description": "One account and every sign-in it can perform. Metadata only — no endpoint returns a stored password or TOTP secret.\n\nAn ARCHIVED account is `404` unless `?includeArchived=true`, which returns it carrying `lifecycleStatus: \"archived\"`. Ask for it when you need to tell a soft-deleted account from an id that never existed — those are different answers, and without the flag they look the same.",
        "operationId": "getV1Test-usersTestUserId",
        "tags": [
          "test-users"
        ],
        "parameters": [
          {
            "name": "testUserId",
            "in": "path",
            "required": true,
            "description": "The testUserId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "in": "query",
            "required": false,
            "description": "`true` to return an archived account instead of `404`. Defaults to `false`.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "description": "The project the caller is acting in. Absent asks the TeaHouse-wide question, which is what a shared account answers.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get a test user",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "testUserId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "agentDescription": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "loginIdentifier": {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "email"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1,
                                      "format": "email",
                                      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "phone"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "custom"
                                    },
                                    "label": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "label",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "username"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "lifecycleStatus": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "ownerEnvironmentId": {
                          "type": "string"
                        },
                        "authTargets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "authTargetId": {
                                "type": "string"
                              },
                              "surface": {
                                "type": "string",
                                "enum": [
                                  "web",
                                  "mobile"
                                ],
                                "description": "THE FIELD TO BRANCH ON. `platform` is present only on `mobile`."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "failed",
                                  "archived",
                                  "verifying",
                                  "needs_sign_in"
                                ]
                              },
                              "statusReason": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "authMethod": {
                                "anyOf": [
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "sso"
                                          },
                                          "provider": {
                                            "type": "string",
                                            "enum": [
                                              "okta",
                                              "auth0",
                                              "google",
                                              "github",
                                              "microsoft"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "provider"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password_totp"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "matcha_account"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password_totp"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "platform": {
                                "type": "string",
                                "enum": [
                                  "android",
                                  "ios",
                                  "all"
                                ]
                              },
                              "lastVerifiedAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "authTargetId",
                              "surface",
                              "status",
                              "statusReason",
                              "authMethod",
                              "lastVerifiedAt",
                              "createdAt",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "testUserId",
                        "name",
                        "agentDescription",
                        "loginIdentifier",
                        "lifecycleStatus",
                        "authTargets",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      },
      "patch": {
        "summary": "Update a test user",
        "description": "Rename it, re-describe it for the agent, change the identifier it signs in with, or replace its password. Every field is optional and an omitted one is LEFT ALONE — a patch, not a replace.\n\n`credentials` rotates the WEB sign-in's secret and ONLY that one. An account's mobile sign-ins keep their own stored secrets and are unaffected — rotate one by posting to `/v1/test-users/{testUserId}/auth-targets` with its `authTargetId`. The response lists every sign-in, so do not read it as confirmation that all of them changed.\n\nIt MERGES rather than replaces: sending only `password` leaves a stored `totpSecret` in place. Nothing reads a secret back, so no endpoint can confirm the old one first.",
        "operationId": "patchV1Test-usersTestUserId",
        "tags": [
          "test-users"
        ],
        "parameters": [
          {
            "name": "testUserId",
            "in": "path",
            "required": true,
            "description": "The testUserId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "agentDescription": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "loginIdentifier": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "email"
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1,
                            "format": "email",
                            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                          }
                        },
                        "required": [
                          "kind",
                          "value"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "phone"
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "kind",
                          "value"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "custom"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "kind",
                          "label",
                          "value"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "username"
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "kind",
                          "value"
                        ]
                      }
                    ]
                  },
                  "credentials": {
                    "type": "object",
                    "properties": {
                      "password": {
                        "type": "string",
                        "minLength": 1
                      },
                      "totpSecret": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update a test user",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "testUserId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "agentDescription": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "loginIdentifier": {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "email"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1,
                                      "format": "email",
                                      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "phone"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "custom"
                                    },
                                    "label": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "label",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "username"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "lifecycleStatus": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "ownerEnvironmentId": {
                          "type": "string"
                        },
                        "authTargets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "authTargetId": {
                                "type": "string"
                              },
                              "surface": {
                                "type": "string",
                                "enum": [
                                  "web",
                                  "mobile"
                                ],
                                "description": "THE FIELD TO BRANCH ON. `platform` is present only on `mobile`."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "failed",
                                  "archived",
                                  "verifying",
                                  "needs_sign_in"
                                ]
                              },
                              "statusReason": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "authMethod": {
                                "anyOf": [
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "sso"
                                          },
                                          "provider": {
                                            "type": "string",
                                            "enum": [
                                              "okta",
                                              "auth0",
                                              "google",
                                              "github",
                                              "microsoft"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "provider"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password_totp"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "matcha_account"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password_totp"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "platform": {
                                "type": "string",
                                "enum": [
                                  "android",
                                  "ios",
                                  "all"
                                ]
                              },
                              "lastVerifiedAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "authTargetId",
                              "surface",
                              "status",
                              "statusReason",
                              "authMethod",
                              "lastVerifiedAt",
                              "createdAt",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "testUserId",
                        "name",
                        "agentDescription",
                        "loginIdentifier",
                        "lifecycleStatus",
                        "authTargets",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      },
      "delete": {
        "summary": "Archive a test user",
        "description": "ARCHIVES rather than deletes, and every sign-in it holds is archived with it. The answer is the archived account carrying `lifecycleStatus: \"archived\"`, not a `204` — so a caller sees what happened rather than inferring it, and can read it back afterwards with `?includeArchived=true`.\n\nAn environment still naming this account in its `identity` keeps the reference. A run that needs it reports that it could not sign in; it does not pass.",
        "operationId": "deleteV1Test-usersTestUserId",
        "tags": [
          "test-users"
        ],
        "parameters": [
          {
            "name": "testUserId",
            "in": "path",
            "required": true,
            "description": "The testUserId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archive a test user",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "testUserId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "agentDescription": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "loginIdentifier": {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "email"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1,
                                      "format": "email",
                                      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "phone"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "custom"
                                    },
                                    "label": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "label",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "username"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "lifecycleStatus": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "ownerEnvironmentId": {
                          "type": "string"
                        },
                        "authTargets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "authTargetId": {
                                "type": "string"
                              },
                              "surface": {
                                "type": "string",
                                "enum": [
                                  "web",
                                  "mobile"
                                ],
                                "description": "THE FIELD TO BRANCH ON. `platform` is present only on `mobile`."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "failed",
                                  "archived",
                                  "verifying",
                                  "needs_sign_in"
                                ]
                              },
                              "statusReason": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "authMethod": {
                                "anyOf": [
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "sso"
                                          },
                                          "provider": {
                                            "type": "string",
                                            "enum": [
                                              "okta",
                                              "auth0",
                                              "google",
                                              "github",
                                              "microsoft"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "provider"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password_totp"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "matcha_account"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password_totp"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "platform": {
                                "type": "string",
                                "enum": [
                                  "android",
                                  "ios",
                                  "all"
                                ]
                              },
                              "lastVerifiedAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "authTargetId",
                              "surface",
                              "status",
                              "statusReason",
                              "authMethod",
                              "lastVerifiedAt",
                              "createdAt",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "testUserId",
                        "name",
                        "agentDescription",
                        "loginIdentifier",
                        "lifecycleStatus",
                        "authTargets",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/test-users": {
      "get": {
        "summary": "List test users",
        "description": "The accounts runs sign in as, with the sign-ins each can perform. Metadata only — no endpoint returns a stored password or TOTP secret.\n\nAn account is TeaHouse-wide unless it records a project. `?projectId=` narrows to one project's shelf; accounts that record no project are shared and appear either way.",
        "operationId": "getV1Test-users",
        "tags": [
          "test-users"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return. Defaults to the endpoint's own page size.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "A `meta.nextCursor` from a previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "description": "Narrow to one project's shelf. Absent is the TeaHouse-wide listing. Accounts recording no project appear either way.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List test users",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "testUserId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "agentDescription": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "loginIdentifier": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "email"
                                      },
                                      "value": {
                                        "type": "string",
                                        "minLength": 1,
                                        "format": "email",
                                        "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "value"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "phone"
                                      },
                                      "value": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "value"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "custom"
                                      },
                                      "label": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "value": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "label",
                                      "value"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "username"
                                      },
                                      "value": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "value"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lifecycleStatus": {
                            "type": "string",
                            "enum": [
                              "active",
                              "archived"
                            ]
                          },
                          "projectId": {
                            "type": "string"
                          },
                          "ownerEnvironmentId": {
                            "type": "string"
                          },
                          "authTargets": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "authTargetId": {
                                  "type": "string"
                                },
                                "surface": {
                                  "type": "string",
                                  "enum": [
                                    "web",
                                    "mobile"
                                  ],
                                  "description": "THE FIELD TO BRANCH ON. `platform` is present only on `mobile`."
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "active",
                                    "failed",
                                    "archived",
                                    "verifying",
                                    "needs_sign_in"
                                  ]
                                },
                                "statusReason": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "authMethod": {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "sso"
                                            },
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "okta",
                                                "auth0",
                                                "google",
                                                "github",
                                                "microsoft"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "provider"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "password"
                                            }
                                          },
                                          "required": [
                                            "type"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "password_totp"
                                            }
                                          },
                                          "required": [
                                            "type"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "matcha_account"
                                            }
                                          },
                                          "required": [
                                            "type"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "password"
                                            }
                                          },
                                          "required": [
                                            "type"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "password_totp"
                                            }
                                          },
                                          "required": [
                                            "type"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    }
                                  ]
                                },
                                "platform": {
                                  "type": "string",
                                  "enum": [
                                    "android",
                                    "ios",
                                    "all"
                                  ]
                                },
                                "lastVerifiedAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "authTargetId",
                                "surface",
                                "status",
                                "statusReason",
                                "authMethod",
                                "lastVerifiedAt",
                                "createdAt",
                                "updatedAt"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "testUserId",
                          "name",
                          "agentDescription",
                          "loginIdentifier",
                          "lifecycleStatus",
                          "authTargets",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "nextCursor"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Pass as `cursor` for the next page. `null` is the last page."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      },
      "post": {
        "summary": "Create a test user",
        "description": "Creates the account AND its first sign-in. A web account is usable immediately; add mobile sign-ins with `POST /v1/test-users/{testUserId}/auth-targets`.\n\n`loginIdentifier` and `credentials.password` are BOTH REQUIRED, including for `sso` — an SSO account still stores the password it signs in with at the provider. The secret is stored encrypted and is never returned by any endpoint.\n\n`matcha_account` is not creatable here: Matcha mints that inbox and its password itself, which only the Coldtea app does today.",
        "operationId": "postV1Test-users",
        "tags": [
          "test-users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "authMethod": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "sso"
                          },
                          "provider": {
                            "type": "string",
                            "enum": [
                              "okta",
                              "auth0",
                              "google",
                              "github",
                              "microsoft"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "provider"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "password"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "password_totp"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "matcha_account"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ]
                  },
                  "loginIdentifier": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "email"
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1,
                            "format": "email",
                            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                          }
                        },
                        "required": [
                          "kind",
                          "value"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "phone"
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "kind",
                          "value"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "custom"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "kind",
                          "label",
                          "value"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "username"
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "kind",
                          "value"
                        ]
                      }
                    ]
                  },
                  "credentials": {
                    "type": "object",
                    "properties": {
                      "password": {
                        "type": "string",
                        "minLength": 1
                      },
                      "totpSecret": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "password"
                    ],
                    "additionalProperties": false
                  },
                  "agentDescription": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "projectId": {
                    "description": "The project this account belongs to. ABSENT or `null` means TeaHouse-wide: visible from every project in the account.\n\n**Set here and permanent.** `PATCH /v1/test-users/{testUserId}` cannot move an account between projects, so choose before you create rather than after.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "environmentId": {
                    "description": "The environment that owns this account. ABSENT or `null` leaves it unowned and attachable from any environment.\n\n**Set here and permanent.** Ownership is what stops another environment attaching this account, so a silent reparent would hand one team's login to another — `PATCH` refuses it. Leaving it unowned is the reversible choice.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "authMethod",
                  "loginIdentifier",
                  "credentials"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a test user",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "testUserId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "agentDescription": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "loginIdentifier": {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "email"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1,
                                      "format": "email",
                                      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "phone"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "custom"
                                    },
                                    "label": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "label",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "username"
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "lifecycleStatus": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "ownerEnvironmentId": {
                          "type": "string"
                        },
                        "authTargets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "authTargetId": {
                                "type": "string"
                              },
                              "surface": {
                                "type": "string",
                                "enum": [
                                  "web",
                                  "mobile"
                                ],
                                "description": "THE FIELD TO BRANCH ON. `platform` is present only on `mobile`."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "failed",
                                  "archived",
                                  "verifying",
                                  "needs_sign_in"
                                ]
                              },
                              "statusReason": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "authMethod": {
                                "anyOf": [
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "sso"
                                          },
                                          "provider": {
                                            "type": "string",
                                            "enum": [
                                              "okta",
                                              "auth0",
                                              "google",
                                              "github",
                                              "microsoft"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "provider"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password_totp"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "matcha_account"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "password_totp"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "platform": {
                                "type": "string",
                                "enum": [
                                  "android",
                                  "ios",
                                  "all"
                                ]
                              },
                              "lastVerifiedAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "authTargetId",
                              "surface",
                              "status",
                              "statusReason",
                              "authMethod",
                              "lastVerifiedAt",
                              "createdAt",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "testUserId",
                        "name",
                        "agentDescription",
                        "loginIdentifier",
                        "lifecycleStatus",
                        "authTargets",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/tests/{testId}": {
      "get": {
        "summary": "Get a test",
        "operationId": "getV1TestsTestId",
        "tags": [
          "tests"
        ],
        "parameters": [
          {
            "name": "testId",
            "in": "path",
            "required": true,
            "description": "The testId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get a test",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "groupId": {
                          "type": "string"
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "target": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "static_url"
                                },
                                "url": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "url"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "deployment_url"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "mobile_app"
                                },
                                "platform": {
                                  "type": "string",
                                  "enum": [
                                    "android",
                                    "ios"
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "platform"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "trigger": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "manual",
                                "github_deployment"
                              ]
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "groupId",
                        "title",
                        "description",
                        "target",
                        "trigger",
                        "createdAt",
                        "updatedAt",
                        "archivedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:read"
            ]
          }
        ]
      },
      "patch": {
        "summary": "Update a test",
        "description": "A test has exactly one group, so moving it between groups is just writing the new `groupId`. Deployment tests cannot be moved.",
        "operationId": "patchV1TestsTestId",
        "tags": [
          "tests"
        ],
        "parameters": [
          {
            "name": "testId",
            "in": "path",
            "required": true,
            "description": "The testId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "targetUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "groupId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update a test",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "groupId": {
                          "type": "string"
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "target": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "static_url"
                                },
                                "url": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "url"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "deployment_url"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "mobile_app"
                                },
                                "platform": {
                                  "type": "string",
                                  "enum": [
                                    "android",
                                    "ios"
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "platform"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "trigger": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "manual",
                                "github_deployment"
                              ]
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "groupId",
                        "title",
                        "description",
                        "target",
                        "trigger",
                        "createdAt",
                        "updatedAt",
                        "archivedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      },
      "delete": {
        "summary": "Archive a test",
        "description": "A soft delete. In-flight runs of this test are canceled.",
        "operationId": "deleteV1TestsTestId",
        "tags": [
          "tests"
        ],
        "parameters": [
          {
            "name": "testId",
            "in": "path",
            "required": true,
            "description": "The testId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archive a test",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "groupId": {
                          "type": "string"
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "target": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "static_url"
                                },
                                "url": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "url"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "deployment_url"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "mobile_app"
                                },
                                "platform": {
                                  "type": "string",
                                  "enum": [
                                    "android",
                                    "ios"
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "platform"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "trigger": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "manual",
                                "github_deployment"
                              ]
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "groupId",
                        "title",
                        "description",
                        "target",
                        "trigger",
                        "createdAt",
                        "updatedAt",
                        "archivedAt"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:write"
            ]
          }
        ]
      }
    },
    "/v1/tests/{testId}/runs": {
      "post": {
        "summary": "Start a run for one test",
        "description": "A test targeting `deployment_url` needs `targetUrl`, and a mobile test with no default build needs `buildReference` — conditional on the test, so both are plain optionals in the schema and neither is optional in practice.\n\nThe `vcs` block STAMPS the run with its commit and pull request so the dashboard and report page show what was tested. It does NOT post a check or a comment back onto the pull request — that comes from a trigger rule, which owns the check name reserved on the repository.\n\nRetrying with the same `clientRequestId` and the same body replays the original run instead of billing twice. The same id with a DIFFERENT body is 409 `idempotency_key_reused`, because that is a caller bug rather than a retry.\n\nAnswers 202; poll `GET /v1/runs/{runId}`.",
        "operationId": "postV1TestsTestIdRuns",
        "tags": [
          "tests"
        ],
        "parameters": [
          {
            "name": "testId",
            "in": "path",
            "required": true,
            "description": "The testId.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clientRequestId": {
                    "type": "string",
                    "pattern": "^mqcr_[A-Za-z0-9_-]+$"
                  },
                  "label": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "targetUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "buildReference": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "uploaded_file"
                      },
                      "artifactId": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The build to run against: the build id `builds upload` returns, or an artifact id."
                      }
                    },
                    "required": [
                      "type",
                      "artifactId"
                    ]
                  },
                  "vcs": {
                    "type": "object",
                    "properties": {
                      "provider": {
                        "type": "string",
                        "enum": [
                          "github",
                          "bitbucket"
                        ]
                      },
                      "repositoryId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "headSha": {
                        "type": "string",
                        "minLength": 1
                      },
                      "prNumber": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "provider",
                      "repositoryId",
                      "headSha",
                      "prNumber"
                    ]
                  },
                  "environmentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "clientRequestId"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Start a run for one test",
            "headers": {
              "X-Coldtea-Request-Id": {
                "description": "The same value as `meta.requestId`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "runId": {
                          "type": "string"
                        },
                        "testId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued",
                            "running",
                            "waiting",
                            "stopping",
                            "completed",
                            "failed",
                            "canceled"
                          ]
                        },
                        "replayed": {
                          "type": "boolean",
                          "description": "`true` when this request did NOT start anything — an earlier request with the same `clientRequestId` already did, and this is that answer replayed. THE PAYLOAD IS THE EARLIER ONE, so a batch that was empty then is empty now even if the group has tests today. A caller that treats a replay as a fresh result reports a green check over work that never ran."
                        }
                      },
                      "required": [
                        "runId",
                        "testId",
                        "status",
                        "replayed"
                      ],
                      "additionalProperties": false
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "description": "Quote this when reporting a problem; it finds the exact request in our logs.",
                          "examples": [
                            "req_9f2c1b7a03e8d45a61b0"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body or query is invalid (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not valid (`unauthorized`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits to do this (`insufficient_credits`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but lacks the scope (`insufficient_scope`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or not yours (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed here; see `Allow`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict a human has to resolve — a taken report name, a repo already linked, a reused idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The repository identity could not be verified (`identity_unverifiable`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (`rate_limited`). `Retry-After` says how long to wait.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Something broke on our side (`internal_error`). Quote the request id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [
              "qa:run"
            ]
          }
        ]
      }
    }
  }
}
