{
  "openapi": "3.1.0",
  "info": {
    "title": "Clanker Ship Public API",
    "version": "1.0.0",
    "description": "HTTP API for every Clanker Ship web action. Create a hashed API key on the website (Security settings), then send `Authorization: Bearer ctk_…` or `X-API-Key`. The web app does not call this API; it uses the same Effect services directly. MCP and `/agent/v1` use agent OAuth access tokens, not API keys."
  },
  "paths": {
    "/v1/workspaces/{slug}/products/{productSlug}/secrets": {
      "get": {
        "tags": ["vault"],
        "operationId": "vault.secrets",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "productSlug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List product secrets and environment status"
      },
      "post": {
        "tags": ["vault"],
        "operationId": "vault.add",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "productSlug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Vault add",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name"],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "values": {
                    "type": "object",
                    "required": [],
                    "properties": {},
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "requestId": {
                    "type": "string",
                    "description": "a string at most 100 character(s) long",
                    "title": "maxLength(100)",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/products/{productSlug}/secrets/{name}": {
      "get": {
        "tags": ["vault"],
        "operationId": "vault.secret",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "productSlug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Read secret metadata, each environment's current version and non-production values"
      },
      "patch": {
        "tags": ["vault"],
        "operationId": "vault.edit",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "productSlug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Vault edit",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "newName": {
                    "type": "string"
                  },
                  "values": {
                    "type": "object",
                    "required": [],
                    "properties": {},
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "expectedVersions": {
                    "type": "object",
                    "required": [],
                    "properties": {},
                    "additionalProperties": {
                      "type": "integer",
                      "description": "a non-negative number",
                      "title": "nonNegative",
                      "minimum": 0
                    }
                  },
                  "requestId": {
                    "type": "string",
                    "description": "a string at most 100 character(s) long",
                    "title": "maxLength(100)",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": ["vault"],
        "operationId": "vault.delete",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "productSlug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Vault delete"
      }
    },
    "/v1/workspaces/{slug}/vault": {
      "get": {
        "tags": ["vault"],
        "operationId": "vault.list",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Vault list"
      }
    },
    "/v1/workspaces/{slug}/vault/assignments": {
      "post": {
        "tags": ["vault"],
        "operationId": "vault.bulkSet",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Vault bulkSet",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["products", "environments", "name", "value"],
                "properties": {
                  "products": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "environments": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "name": {
                    "type": "string"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "requestId": {
                    "type": "string",
                    "description": "a string at most 100 character(s) long",
                    "title": "maxLength(100)",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/vault/generations": {
      "post": {
        "tags": ["vault"],
        "operationId": "vault.generate",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Generate a value for each selected environment, shared by its selected products",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["products", "environments", "name", "generator"],
                "properties": {
                  "products": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "environments": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "name": {
                    "type": "string"
                  },
                  "generator": {
                    "anyOf": [
                      {
                        "type": "object",
                        "required": ["type"],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": ["token"]
                          },
                          "bytes": {
                            "$ref": "#/components/schemas/Int",
                            "description": "a number between 16 and 512",
                            "title": "between(16, 512)",
                            "minimum": 16,
                            "maximum": 512
                          },
                          "encoding": {
                            "type": "string",
                            "enum": ["hex", "base64", "base64url"]
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "required": ["type"],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": ["password"]
                          },
                          "length": {
                            "$ref": "#/components/schemas/Int",
                            "description": "a number between 8 and 256",
                            "title": "between(8, 256)",
                            "minimum": 8,
                            "maximum": 256
                          },
                          "lowercase": {
                            "type": "boolean"
                          },
                          "uppercase": {
                            "type": "boolean"
                          },
                          "digits": {
                            "type": "boolean"
                          },
                          "symbols": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "required": ["type"],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": ["uuid"]
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "required": ["type"],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": ["ed25519"]
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  },
                  "reveal": {
                    "type": "boolean"
                  },
                  "requestId": {
                    "type": "string",
                    "description": "a string at most 100 character(s) long",
                    "title": "maxLength(100)",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/products/{productSlug}/secrets/{name}/environments/{environmentSlug}/versions": {
      "get": {
        "tags": ["vault"],
        "operationId": "vault.history",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "productSlug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "environmentSlug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "values",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["true", "false"]
            },
            "required": false
          },
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "a string to be decoded into a number"
            },
            "required": false,
            "description": "a string to be decoded into a number"
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Vault history"
      }
    },
    "/v1/workspaces/{slug}/products/{productSlug}/secrets/{name}/environments/{environmentSlug}/restore": {
      "post": {
        "tags": ["vault"],
        "operationId": "vault.restore",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "productSlug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "environmentSlug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Vault restore",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["version"],
                "properties": {
                  "version": {
                    "type": "integer",
                    "description": "a positive number",
                    "title": "positive",
                    "exclusiveMinimum": 0
                  },
                  "requestId": {
                    "type": "string",
                    "description": "a string at most 100 character(s) long",
                    "title": "maxLength(100)",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/vault/keys": {
      "get": {
        "tags": ["vault"],
        "operationId": "vault.keys",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Vault keys"
      },
      "post": {
        "tags": ["vault"],
        "operationId": "vault.createKey",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Vault createKey",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "productIds", "environmentIds"],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "productIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "environmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/vault/keys/{id}": {
      "patch": {
        "tags": ["vault"],
        "operationId": "vault.updateKey",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Vault updateKey",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "productIds", "environmentIds"],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "productIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "environmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/vault/keys/{id}/revoke": {
      "post": {
        "tags": ["vault"],
        "operationId": "vault.revokeKey",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Vault revokeKey"
      }
    },
    "/v1/workspaces/{slug}/account-api-keys": {
      "get": {
        "tags": ["vault"],
        "operationId": "vault.accountKeys",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Vault accountKeys"
      },
      "post": {
        "tags": ["vault"],
        "operationId": "vault.createAccountKey",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Vault createAccountKey",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "role"],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string",
                    "enum": ["owner", "admin", "member", "viewer"]
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/account-api-keys/{id}": {
      "patch": {
        "tags": ["vault"],
        "operationId": "vault.updateAccountKey",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Update account API key name and role",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "role"],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string",
                    "enum": ["owner", "admin", "member", "viewer"]
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/account-api-keys/{id}/revoke": {
      "post": {
        "tags": ["vault"],
        "operationId": "vault.revokeAccountKey",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Vault revokeAccountKey"
      }
    },
    "/v1/workspaces/{slug}/products/{productSlug}/environments/{environmentSlug}/secrets/pull": {
      "get": {
        "tags": ["vaultPull"],
        "operationId": "vaultPull.pull",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "productSlug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "environmentSlug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [],
                  "properties": {},
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Pull current secrets with an environment-appropriate key"
      }
    },
    "/": {
      "get": {
        "tags": ["system"],
        "operationId": "system.root",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok", "service"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    },
                    "service": {
                      "type": "string",
                      "enum": ["api"]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Liveness"
      }
    },
    "/health": {
      "get": {
        "tags": ["system"],
        "operationId": "system.health",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok", "service"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    },
                    "service": {
                      "type": "string",
                      "enum": ["api"]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Liveness"
      }
    },
    "/v1/api-keys": {
      "get": {
        "tags": ["apiKeys"],
        "operationId": "apiKeys.list",
        "parameters": [],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "name",
                      "tokenPrefix",
                      "lastFour",
                      "createdAt",
                      "lastUsedAt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "tokenPrefix": {
                        "type": "string"
                      },
                      "lastFour": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "lastUsedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List API keys"
      },
      "post": {
        "tags": ["apiKeys"],
        "operationId": "apiKeys.create",
        "parameters": [],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["id", "name", "tokenPrefix", "lastFour", "secret"],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "tokenPrefix": {
                      "type": "string"
                    },
                    "lastFour": {
                      "type": "string"
                    },
                    "secret": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Create API key",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name"],
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/api-keys/{apiKeyId}/revoke": {
      "post": {
        "tags": ["apiKeys"],
        "operationId": "apiKeys.revoke",
        "parameters": [
          {
            "name": "apiKeyId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Revoke API key"
      }
    },
    "/v1/me": {
      "get": {
        "tags": ["me"],
        "operationId": "me.profile",
        "parameters": [],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["id", "name", "email", "image"],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "image": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "accountWorkspaceId": {
                      "type": "string"
                    },
                    "accountRole": {
                      "type": "string",
                      "enum": ["owner", "admin", "member", "viewer"]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Get profile"
      },
      "patch": {
        "tags": ["me"],
        "operationId": "me.updateProfile",
        "parameters": [],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Update profile name",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name"],
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/me/photo": {
      "post": {
        "tags": ["me"],
        "operationId": "me.uploadPhoto",
        "parameters": [],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok", "image"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    },
                    "image": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Upload profile photo",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/v1/me/preferences": {
      "get": {
        "tags": ["me"],
        "operationId": "me.preferences",
        "parameters": [],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["userId", "productUpdates", "workspaceActivity"],
                  "properties": {
                    "userId": {
                      "type": "string"
                    },
                    "productUpdates": {
                      "type": "boolean"
                    },
                    "workspaceActivity": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Get notification preferences"
      },
      "patch": {
        "tags": ["me"],
        "operationId": "me.updatePreferences",
        "parameters": [],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Update notification preferences",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["productUpdates", "workspaceActivity"],
                "properties": {
                  "productUpdates": {
                    "type": "boolean"
                  },
                  "workspaceActivity": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/me/home": {
      "get": {
        "tags": ["me"],
        "operationId": "me.home",
        "parameters": [],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "a string",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Home destination path"
      }
    },
    "/v1/me/onboarding": {
      "get": {
        "tags": ["me"],
        "operationId": "me.onboarding",
        "parameters": [],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["existing"],
                  "properties": {
                    "existing": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": ["id", "name", "slug", "iconUrl", "role"],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "iconUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "role": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Onboarding workspace"
      }
    },
    "/v1/workspaces": {
      "get": {
        "tags": ["workspaces"],
        "operationId": "workspaces.list",
        "parameters": [],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": ["id", "name", "slug", "iconUrl", "role"],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "iconUrl": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "role": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List memberships"
      },
      "post": {
        "tags": ["workspaces"],
        "operationId": "workspaces.create",
        "parameters": [],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok", "workspace"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    },
                    "workspace": {
                      "type": "object",
                      "required": ["id", "name", "slug", "creatorUserId"],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "creatorUserId": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Create workspace",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "slug"],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/slugs/{slug}": {
      "get": {
        "tags": ["workspaces"],
        "operationId": "workspaces.slugAvailable",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "excludeWorkspaceId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["available"],
                  "properties": {
                    "available": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Check whether a workspace slug is available"
      }
    },
    "/v1/workspaces/{slug}": {
      "get": {
        "tags": ["workspaces"],
        "operationId": "workspaces.get",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "userId",
                    "workspaceId",
                    "name",
                    "slug",
                    "iconUrl",
                    "allowedDomains",
                    "role"
                  ],
                  "properties": {
                    "userId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "accountApiKeyId": {
                      "type": "string"
                    },
                    "workspaceId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "iconUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "allowedDomains": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "role": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Get workspace"
      },
      "patch": {
        "tags": ["workspaces"],
        "operationId": "workspaces.update",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Update workspace",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "slug"],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "allowedDomains": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/slug-availability": {
      "get": {
        "tags": ["workspaces"],
        "operationId": "workspaces.slugAvailability",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "slug",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["available"],
                  "properties": {
                    "available": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Check a candidate slug against this workspace"
      }
    },
    "/v1/workspaces/{slug}/icon": {
      "post": {
        "tags": ["workspaces"],
        "operationId": "workspaces.uploadIcon",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok", "iconUrl"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    },
                    "iconUrl": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Upload workspace icon",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/{slug}/members": {
      "get": {
        "tags": ["workspaces"],
        "operationId": "workspaces.members",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List members"
      }
    },
    "/v1/workspaces/{slug}/members/{userId}": {
      "patch": {
        "tags": ["workspaces"],
        "operationId": "workspaces.changeMemberRole",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Change member role",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["role"],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": ["owner", "admin", "member", "viewer"]
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": ["workspaces"],
        "operationId": "workspaces.removeMember",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Remove member"
      }
    },
    "/v1/workspaces/{slug}/invites": {
      "get": {
        "tags": ["workspaces"],
        "operationId": "workspaces.invites",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List invites"
      },
      "post": {
        "tags": ["workspaces"],
        "operationId": "workspaces.createInvites",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Create invites",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["emails", "role", "teamIds"],
                "properties": {
                  "emails": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "role": {
                    "type": "string",
                    "enum": ["owner", "admin", "member", "viewer"]
                  },
                  "teamIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/invites/{inviteId}/revoke": {
      "post": {
        "tags": ["workspaces"],
        "operationId": "workspaces.revokeInvite",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "inviteId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Revoke invite"
      }
    },
    "/v1/workspaces/{slug}/invites/{inviteId}": {
      "patch": {
        "tags": ["workspaces"],
        "operationId": "workspaces.changeInviteRole",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "inviteId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Change invite role",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["role"],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": ["owner", "admin", "member", "viewer"]
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/invites/{inviteId}/resend": {
      "post": {
        "tags": ["workspaces"],
        "operationId": "workspaces.resendInvite",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "inviteId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Resend invite"
      }
    },
    "/v1/workspaces/{slug}/events": {
      "get": {
        "tags": ["workspaces"],
        "operationId": "workspaces.events",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List events"
      }
    },
    "/v1/workspaces/{slug}/people": {
      "get": {
        "tags": ["workspaces"],
        "operationId": "workspaces.people",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "People page data"
      }
    },
    "/v1/workspaces/{slug}/seeds": {
      "get": {
        "tags": ["workspaces"],
        "operationId": "workspaces.seeds",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Seed workspaces"
      }
    },
    "/v1/seeds/{workspaceId}/join": {
      "post": {
        "tags": ["workspaces"],
        "operationId": "workspaces.joinSeed",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok", "slug"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    },
                    "slug": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Join seed workspace"
      }
    },
    "/v1/invites/{token}/accept": {
      "post": {
        "tags": ["workspaces"],
        "operationId": "workspaces.acceptInvite",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok", "workspaceSlug"],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [true]
                    },
                    "workspaceSlug": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Accept invite"
      }
    },
    "/v1/workspaces/{slug}/products": {
      "get": {
        "tags": ["catalog"],
        "operationId": "catalog.listProducts",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["exclude", "include", "only"],
              "description": "Which archived objects to return. Defaults to exclude."
            },
            "required": false,
            "description": "Which archived objects to return. Defaults to exclude."
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["products"],
                  "properties": {
                    "products": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Product"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List products"
      },
      "post": {
        "tags": ["catalog"],
        "operationId": "catalog.createProduct",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "Software the workspace tests.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "type",
                    "description",
                    "repository",
                    "archivedAt",
                    "createdAt",
                    "updatedAt",
                    "deployments"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": ["website", "api", "cli", "mobile_app", "desktop_app", "agent"]
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "repository": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The source repository, such as acme/storefront, that agent sessions report."
                    },
                    "archivedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deployments": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Deployment"
                      },
                      "description": "Deployments whose environment is active."
                    }
                  },
                  "additionalProperties": false,
                  "description": "Software the workspace tests."
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Create a product",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["slug", "name", "type"],
                "properties": {
                  "slug": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": ["website", "api", "cli", "mobile_app", "desktop_app", "agent"],
                    "description": "What kind of software this is."
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "repository": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "owner/name, such as acme/storefront."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/products/{product}": {
      "get": {
        "tags": ["catalog"],
        "operationId": "catalog.getProduct",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "product",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Software the workspace tests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Get a product, archived or not"
      },
      "patch": {
        "tags": ["catalog"],
        "operationId": "catalog.updateProduct",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "product",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Software the workspace tests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Changes only the fields sent. `null` clears the description.",
        "summary": "Change a product",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "slug": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": ["website", "api", "cli", "mobile_app", "desktop_app", "agent"],
                    "description": "What kind of software this is."
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "repository": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "owner/name, such as acme/storefront."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/products/{product}/archive": {
      "post": {
        "tags": ["catalog"],
        "operationId": "catalog.archiveProduct",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "product",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Software the workspace tests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Hides the product and refuses vault pulls for its deployments until it is restored. Archiving an archived product changes nothing.",
        "summary": "Archive a product"
      }
    },
    "/v1/workspaces/{slug}/products/{product}/restore": {
      "post": {
        "tags": ["catalog"],
        "operationId": "catalog.restoreProduct",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "product",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Software the workspace tests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Restore an archived product"
      }
    },
    "/v1/workspaces/{slug}/environments": {
      "get": {
        "tags": ["catalog"],
        "operationId": "catalog.listEnvironments",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["exclude", "include", "only"],
              "description": "Which archived objects to return. Defaults to exclude."
            },
            "required": false,
            "description": "Which archived objects to return. Defaults to exclude."
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["environments"],
                  "properties": {
                    "environments": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Environment"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List environments"
      },
      "post": {
        "tags": ["catalog"],
        "operationId": "catalog.createEnvironment",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "A place products run, shared by every product in the workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "class",
                    "description",
                    "emoji",
                    "archivedAt",
                    "createdAt",
                    "updatedAt",
                    "deployments"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "class": {
                      "type": "string",
                      "enum": ["production", "non-production"]
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "emoji": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "archivedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deployments": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Deployment"
                      },
                      "description": "Deployments whose product is active."
                    }
                  },
                  "additionalProperties": false,
                  "description": "A place products run, shared by every product in the workspace."
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Create an environment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["slug", "name", "class"],
                "properties": {
                  "slug": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "class": {
                    "type": "string",
                    "enum": ["production", "non-production"],
                    "description": "Production holds real customer data. Permanent once set."
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "emoji": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/environments/{environment}": {
      "get": {
        "tags": ["catalog"],
        "operationId": "catalog.getEnvironment",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "environment",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A place products run, shared by every product in the workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Get an environment, archived or not"
      },
      "patch": {
        "tags": ["catalog"],
        "operationId": "catalog.updateEnvironment",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "environment",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A place products run, shared by every product in the workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Changes only the fields sent. `null` clears the description or emoji. The class cannot change.",
        "summary": "Change an environment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "slug": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "emoji": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "class": {
                    "$id": "/schemas/unknown",
                    "title": "unknown",
                    "description": "Always rejected: an environment's class cannot change."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/environments/{environment}/archive": {
      "post": {
        "tags": ["catalog"],
        "operationId": "catalog.archiveEnvironment",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "environment",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A place products run, shared by every product in the workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Archive an environment"
      }
    },
    "/v1/workspaces/{slug}/environments/{environment}/restore": {
      "post": {
        "tags": ["catalog"],
        "operationId": "catalog.restoreEnvironment",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "environment",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A place products run, shared by every product in the workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Restore an archived environment"
      }
    },
    "/v1/workspaces/{slug}/deployments": {
      "get": {
        "tags": ["catalog"],
        "operationId": "catalog.listDeployments",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "environment",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["exclude", "include", "only"],
              "description": "Whether to include deployments whose product or environment is archived. Defaults to exclude."
            },
            "required": false,
            "description": "Whether to include deployments whose product or environment is archived. Defaults to exclude."
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["deployments"],
                  "properties": {
                    "deployments": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Deployment"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List deployments"
      },
      "post": {
        "tags": ["catalog"],
        "operationId": "catalog.createDeployment",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "One product running in one environment.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "product",
                    "environment",
                    "baseUrl",
                    "version",
                    "versionUpdatedAt",
                    "active",
                    "createdAt",
                    "updatedAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "product": {
                      "type": "object",
                      "required": ["id", "slug", "name", "type", "archived"],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": ["website", "api", "cli", "mobile_app", "desktop_app", "agent"]
                        },
                        "archived": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    },
                    "environment": {
                      "type": "object",
                      "required": ["id", "slug", "name", "class", "emoji", "archived"],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "class": {
                          "type": "string",
                          "enum": ["production", "non-production"]
                        },
                        "emoji": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "archived": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    },
                    "baseUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "versionUpdatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "active": {
                      "type": "boolean",
                      "description": "False while the product or the environment is archived."
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false,
                  "description": "One product running in one environment."
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Deploy a product to an environment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["product", "environment"],
                "properties": {
                  "product": {
                    "type": "string"
                  },
                  "environment": {
                    "type": "string"
                  },
                  "baseUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Required for website and API products."
                  },
                  "version": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/deployments/{product}/{environment}": {
      "get": {
        "tags": ["catalog"],
        "operationId": "catalog.getDeployment",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "product",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "environment",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "One product running in one environment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deployment"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Get a deployment"
      },
      "patch": {
        "tags": ["catalog"],
        "operationId": "catalog.updateDeployment",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "product",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "environment",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "One product running in one environment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deployment"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Changes only the fields sent. `null` clears a field. Send `version` after each deploy to record what is running.",
        "summary": "Change a deployment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "baseUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "version": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": ["catalog"],
        "operationId": "catalog.removeDeployment",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "product",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "environment",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Deletes the deployment. Its secret values are kept and return if the product is deployed to the environment again.",
        "summary": "Remove a deployment"
      }
    },
    "/v1/workspaces/{slug}/teams": {
      "get": {
        "tags": ["planning"],
        "operationId": "planning.listTeams",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["exclude", "include", "only"],
              "description": "Which archived objects to return. Defaults to exclude."
            },
            "required": false,
            "description": "Which archived objects to return. Defaults to exclude."
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["teams"],
                  "properties": {
                    "teams": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Team"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Open teams and the private teams the caller is in.",
        "summary": "List teams"
      },
      "post": {
        "tags": ["planning"],
        "operationId": "planning.createTeam",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "A group of members that numbers its tickets.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "key",
                    "name",
                    "visibility",
                    "archivedAt",
                    "members",
                    "joined",
                    "createdAt",
                    "updatedAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "key": {
                      "type": "string",
                      "description": "2–5 capital letters that prefix ticket IDs."
                    },
                    "name": {
                      "type": "string"
                    },
                    "visibility": {
                      "type": "string",
                      "enum": ["open", "private"]
                    },
                    "archivedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Person"
                      }
                    },
                    "joined": {
                      "type": "boolean",
                      "description": "Whether the caller is a member."
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false,
                  "description": "A group of members that numbers its tickets."
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Owners and admins create teams. The team copies the workspace's ticket statuses, and the caller joins it.",
        "summary": "Create a team",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "key"],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string",
                    "description": "2–5 letters, such as WEB."
                  },
                  "visibility": {
                    "type": "string",
                    "enum": ["open", "private"],
                    "description": "Defaults to open."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/teams/{team}": {
      "get": {
        "tags": ["planning"],
        "operationId": "planning.getTeam",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A group of members that numbers its tickets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Get a team"
      },
      "patch": {
        "tags": ["planning"],
        "operationId": "planning.updateTeam",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A group of members that numbers its tickets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "A key changes only while the team has no tickets.",
        "summary": "Change a team",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  },
                  "visibility": {
                    "type": "string",
                    "enum": ["open", "private"],
                    "description": "Who sees the team."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": ["planning"],
        "operationId": "planning.deleteTeam",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Delete a team without tickets"
      }
    },
    "/v1/workspaces/{slug}/teams/{team}/archive": {
      "post": {
        "tags": ["planning"],
        "operationId": "planning.archiveTeam",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A group of members that numbers its tickets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Archive a team"
      }
    },
    "/v1/workspaces/{slug}/teams/{team}/restore": {
      "post": {
        "tags": ["planning"],
        "operationId": "planning.restoreTeam",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A group of members that numbers its tickets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Restore a team"
      }
    },
    "/v1/workspaces/{slug}/teams/{team}/join": {
      "post": {
        "tags": ["planning"],
        "operationId": "planning.joinTeam",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A group of members that numbers its tickets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Join an open team"
      }
    },
    "/v1/workspaces/{slug}/teams/{team}/members": {
      "post": {
        "tags": ["planning"],
        "operationId": "planning.addTeamMember",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A group of members that numbers its tickets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Add a member to a team",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["person"],
                "properties": {
                  "person": {
                    "type": "string",
                    "description": "A member's email or user ID."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/teams/{team}/members/{person}": {
      "delete": {
        "tags": ["planning"],
        "operationId": "planning.removeTeamMember",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "person",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A group of members that numbers its tickets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Remove a member from a team, or leave it"
      }
    },
    "/v1/workspaces/{slug}/ticket-statuses": {
      "get": {
        "tags": ["planning"],
        "operationId": "planning.listTicketStatuses",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "A team key, such as WEB."
            },
            "required": false,
            "description": "A team key, such as WEB."
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["statuses"],
                  "properties": {
                    "statuses": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TicketStatus"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "A team's statuses, or the workspace's template that new teams copy.",
        "summary": "List ticket statuses"
      },
      "post": {
        "tags": ["planning"],
        "operationId": "planning.createTicketStatus",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["id", "name", "category", "position", "isDefault"],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string",
                      "enum": ["backlog", "unstarted", "started", "completed", "canceled"]
                    },
                    "position": {
                      "type": "number"
                    },
                    "isDefault": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Owners and admins change statuses. The new status goes last in its category.",
        "summary": "Add a ticket status",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "category"],
                "properties": {
                  "team": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "A team key; leave out for the workspace template."
                  },
                  "name": {
                    "type": "string"
                  },
                  "category": {
                    "type": "string",
                    "enum": ["backlog", "unstarted", "started", "completed", "canceled"],
                    "description": "The status's category; fixed once created."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/ticket-statuses/{status}": {
      "patch": {
        "tags": ["planning"],
        "operationId": "planning.updateTicketStatus",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "status",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "TicketStatus",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketStatus"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Rename a ticket status or make it the default",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "isDefault": {
                    "type": "boolean",
                    "enum": [true],
                    "description": "true makes this the default for new tickets; Backlog or Unstarted only."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": ["planning"],
        "operationId": "planning.deleteTicketStatus",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "status",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "moveTo",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "The status, of the same team, that takes this status's tickets."
            },
            "required": false,
            "description": "The status, of the same team, that takes this status's tickets."
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Every category keeps at least one status and the default stays. Tickets that use the status move to `moveTo`.",
        "summary": "Delete a ticket status"
      }
    },
    "/v1/workspaces/{slug}/ticket-statuses/{status}/reorder": {
      "post": {
        "tags": ["planning"],
        "operationId": "planning.reorderTicketStatus",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "status",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["statuses"],
                  "properties": {
                    "statuses": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TicketStatus"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Move a status within its category",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "before": {
                    "type": "string"
                  },
                  "after": {
                    "type": "string"
                  }
                },
                "additionalProperties": false,
                "description": "Send before or after, not both."
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/tags": {
      "get": {
        "tags": ["planning"],
        "operationId": "planning.listTags",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "A team key, such as WEB."
            },
            "required": false,
            "description": "A team key, such as WEB."
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["tags"],
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tag"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List tags"
      },
      "post": {
        "tags": ["planning"],
        "operationId": "planning.createTag",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["id", "name", "color", "team"],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "color": {
                      "type": "string",
                      "enum": [
                        "gray",
                        "red",
                        "orange",
                        "amber",
                        "green",
                        "teal",
                        "cobalt",
                        "iris",
                        "pink"
                      ]
                    },
                    "team": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": ["id", "key"],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The team a team tag belongs to; null for workspace tags."
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Create a tag",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "color"],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "gray",
                      "red",
                      "orange",
                      "amber",
                      "green",
                      "teal",
                      "cobalt",
                      "iris",
                      "pink"
                    ],
                    "description": "The tag's color."
                  },
                  "team": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "A team key for a team tag."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/tags/{tag}": {
      "patch": {
        "tags": ["planning"],
        "operationId": "planning.updateTag",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "tag",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Change a tag",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "gray",
                      "red",
                      "orange",
                      "amber",
                      "green",
                      "teal",
                      "cobalt",
                      "iris",
                      "pink"
                    ],
                    "description": "The tag's color."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": ["planning"],
        "operationId": "planning.deleteTag",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "tag",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Delete a tag"
      }
    },
    "/v1/workspaces/{slug}/projects": {
      "get": {
        "tags": ["planning"],
        "operationId": "planning.listProjects",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "A team key, such as WEB."
            },
            "required": false,
            "description": "A team key, such as WEB."
          },
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "A product slug."
            },
            "required": false,
            "description": "A product slug."
          },
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["exclude", "include", "only"],
              "description": "Which archived objects to return. Defaults to exclude."
            },
            "required": false,
            "description": "Which archived objects to return. Defaults to exclude."
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["projects"],
                  "properties": {
                    "projects": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Project"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List projects in priority order"
      },
      "post": {
        "tags": ["planning"],
        "operationId": "planning.createProject",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "A project with its document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "summary",
                    "status",
                    "lead",
                    "targetDate",
                    "teams",
                    "products",
                    "milestones",
                    "progress",
                    "archivedAt",
                    "createdAt",
                    "updatedAt",
                    "document"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "summary": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": ["planned", "active", "paused", "completed", "canceled"]
                    },
                    "lead": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Person"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "targetDate": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TeamRef"
                      }
                    },
                    "products": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": ["id", "slug", "name"],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "milestones": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Milestone"
                      }
                    },
                    "progress": {
                      "type": "object",
                      "required": ["backlog", "unstarted", "started", "completed", "canceled"],
                      "properties": {
                        "backlog": {
                          "type": "number"
                        },
                        "unstarted": {
                          "type": "number"
                        },
                        "started": {
                          "type": "number"
                        },
                        "completed": {
                          "type": "number"
                        },
                        "canceled": {
                          "type": "number"
                        }
                      },
                      "additionalProperties": false,
                      "description": "The project's tickets counted by status category."
                    },
                    "archivedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "document": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Markdown."
                    }
                  },
                  "additionalProperties": false,
                  "description": "A project with its document."
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Create a project",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "slug", "teams"],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "summary": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": ["planned", "active", "paused", "completed", "canceled"],
                    "description": "Defaults to planned."
                  },
                  "lead": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "A member's email or user ID."
                  },
                  "targetDate": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "YYYY-MM-DD."
                  },
                  "teams": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Team keys; at least one."
                  },
                  "products": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Product slugs."
                  },
                  "document": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/projects/{project}": {
      "get": {
        "tags": ["planning"],
        "operationId": "planning.getProject",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "project",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A project with its document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetail"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Get a project with its document"
      },
      "patch": {
        "tags": ["planning"],
        "operationId": "planning.updateProject",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "project",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A project with its document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetail"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Changes only the fields sent. `teams` and `products` replace the links; a team stays linked while the project holds its tickets.",
        "summary": "Change a project",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "summary": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": ["planned", "active", "paused", "completed", "canceled"],
                    "description": "Defaults to planned."
                  },
                  "lead": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "A member's email or user ID."
                  },
                  "targetDate": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "YYYY-MM-DD."
                  },
                  "teams": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "products": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Product slugs."
                  },
                  "document": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/projects/{project}/reorder": {
      "post": {
        "tags": ["planning"],
        "operationId": "planning.reorderProject",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "project",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A project with its document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetail"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Send `before` or `after`, not both.",
        "summary": "Move a project in priority order",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "before": {
                    "type": "string",
                    "description": "The project slug to go right before."
                  },
                  "after": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The project slug to go right after, or null to go first."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/projects/{project}/archive": {
      "post": {
        "tags": ["planning"],
        "operationId": "planning.archiveProject",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "project",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A project with its document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetail"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Archive a project"
      }
    },
    "/v1/workspaces/{slug}/projects/{project}/restore": {
      "post": {
        "tags": ["planning"],
        "operationId": "planning.restoreProject",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "project",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A project with its document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetail"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Restore a project"
      }
    },
    "/v1/workspaces/{slug}/projects/{project}/milestones": {
      "post": {
        "tags": ["planning"],
        "operationId": "planning.createMilestone",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "project",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["id", "number", "name", "summary"],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "number": {
                      "type": "number",
                      "description": "Numbered within the project: 2 is M2."
                    },
                    "name": {
                      "type": "string"
                    },
                    "summary": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Add a milestone to a project",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name"],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "summary": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/projects/{project}/milestones/{milestone}": {
      "patch": {
        "tags": ["planning"],
        "operationId": "planning.updateMilestone",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "project",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "milestone",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Milestone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Milestone"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Change a milestone",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "summary": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": ["planning"],
        "operationId": "planning.deleteMilestone",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "project",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "milestone",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Delete a milestone"
      }
    },
    "/v1/workspaces/{slug}/tickets": {
      "get": {
        "tags": ["planning"],
        "operationId": "planning.listTickets",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "A team key, such as WEB."
            },
            "required": false,
            "description": "A team key, such as WEB."
          },
          {
            "name": "project",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "A project slug."
            },
            "required": false,
            "description": "A project slug."
          },
          {
            "name": "owner",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "mine for tickets the caller's agents own, or an agent ID."
            },
            "required": false,
            "description": "mine for tickets the caller's agents own, or an agent ID."
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Comma-separated status categories: backlog, unstarted, started, completed, canceled."
            },
            "required": false,
            "description": "Comma-separated status categories: backlog, unstarted, started, completed, canceled."
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["tickets"],
                  "properties": {
                    "tickets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TicketListItem"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List tickets"
      },
      "post": {
        "tags": ["planning"],
        "operationId": "planning.createTicket",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "The unit of work, with its plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "identifier",
                    "number",
                    "team",
                    "title",
                    "summary",
                    "status",
                    "owner",
                    "project",
                    "milestone",
                    "tags",
                    "rank",
                    "createdAt",
                    "updatedAt",
                    "plan",
                    "createdBy",
                    "formerIdentifiers"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "identifier": {
                      "type": "string",
                      "description": "The team key and number, such as WEB-31."
                    },
                    "number": {
                      "type": "number"
                    },
                    "team": {
                      "$ref": "#/components/schemas/TeamRef"
                    },
                    "title": {
                      "type": "string"
                    },
                    "summary": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "$ref": "#/components/schemas/TicketStatus"
                    },
                    "owner": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Agent"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "project": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": ["id", "slug", "name"],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "milestone": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": ["id", "number", "name"],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "number": {
                              "type": "number"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tag"
                      }
                    },
                    "rank": {
                      "type": "number"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "plan": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Markdown."
                    },
                    "createdBy": {
                      "type": "object",
                      "required": ["person", "agent"],
                      "properties": {
                        "person": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/Person"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "agent": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/Agent"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "formerIdentifiers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "IDs the ticket had on other teams; each still finds it."
                    }
                  },
                  "additionalProperties": false,
                  "description": "The unit of work, with its plan."
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "The ticket takes the team's next number and, unless a status is named, the team's default status.",
        "summary": "Create a ticket",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["title", "team"],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "plan": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "description": "A status name of the ticket's team, such as In Progress."
                  },
                  "owner": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "An agent ID, or me for the calling agent."
                  },
                  "project": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "A project slug linked to the ticket's team."
                  },
                  "milestone": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "A milestone of the ticket's project, such as M2."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Tag names; workspace tags and the team's own tags."
                  },
                  "team": {
                    "type": "string",
                    "description": "The team key, such as WEB."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/tickets/{ticket}": {
      "get": {
        "tags": ["planning"],
        "operationId": "planning.getTicket",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "ticket",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The unit of work, with its plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Get a ticket by its ID, such as WEB-31"
      },
      "patch": {
        "tags": ["planning"],
        "operationId": "planning.updateTicket",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "ticket",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The unit of work, with its plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Changes only the fields sent. `null` clears a field; `tags` replaces the ticket's tags.",
        "summary": "Change a ticket",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "plan": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "description": "A status name of the ticket's team, such as In Progress."
                  },
                  "owner": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "An agent ID, or me for the calling agent."
                  },
                  "project": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "A project slug linked to the ticket's team."
                  },
                  "milestone": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "A milestone of the ticket's project, such as M2."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Tag names; workspace tags and the team's own tags."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/tickets/{ticket}/move": {
      "post": {
        "tags": ["planning"],
        "operationId": "planning.moveTicket",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "ticket",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The unit of work, with its plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "The ticket takes the new team's next number; its old ID keeps finding it.",
        "summary": "Move a ticket to another team",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["team"],
                "properties": {
                  "team": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/teams/{team}/views": {
      "get": {
        "tags": ["planning"],
        "operationId": "planning.listTeamViews",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["views"],
                  "properties": {
                    "views": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/View"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List a team's views"
      },
      "post": {
        "tags": ["planning"],
        "operationId": "planning.createTeamView",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "A saved way to look at a team's or a project's tickets.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "team",
                    "project",
                    "filters",
                    "groupBy",
                    "orderBy",
                    "layout",
                    "isDefault",
                    "createdAt",
                    "updatedAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "team": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": ["id", "key", "name"],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "project": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": ["id", "slug", "name"],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "filters": {
                      "$ref": "#/components/schemas/ViewFilters"
                    },
                    "groupBy": {
                      "type": "string",
                      "enum": [
                        "status",
                        "category",
                        "owner",
                        "tag",
                        "project",
                        "milestone",
                        "team",
                        "none"
                      ]
                    },
                    "orderBy": {
                      "type": "string",
                      "enum": ["manual", "created", "updated"]
                    },
                    "layout": {
                      "type": "string",
                      "enum": ["list", "board"]
                    },
                    "isDefault": {
                      "type": "boolean",
                      "description": "Whether the owner's Tickets page opens this view."
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false,
                  "description": "A saved way to look at a team's or a project's tickets."
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Save a view for a team",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name"],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "filters": {
                    "$ref": "#/components/schemas/ViewFilters"
                  },
                  "groupBy": {
                    "type": "string",
                    "enum": [
                      "status",
                      "category",
                      "owner",
                      "tag",
                      "project",
                      "milestone",
                      "team",
                      "none"
                    ],
                    "description": "How tickets are grouped. Defaults to status."
                  },
                  "orderBy": {
                    "type": "string",
                    "enum": ["manual", "created", "updated"],
                    "description": "Defaults to manual, the order people set."
                  },
                  "layout": {
                    "type": "string",
                    "enum": ["list", "board"],
                    "description": "Defaults to list."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/teams/{team}/views/{view}": {
      "get": {
        "tags": ["planning"],
        "operationId": "planning.getTeamView",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "view",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A view with its tickets, in its order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViewTickets"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Get a view with its tickets"
      },
      "patch": {
        "tags": ["planning"],
        "operationId": "planning.updateTeamView",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "view",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A saved way to look at a team's or a project's tickets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Change a view, or make it the default",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "filters": {
                    "$ref": "#/components/schemas/ViewFilters"
                  },
                  "groupBy": {
                    "type": "string",
                    "enum": [
                      "status",
                      "category",
                      "owner",
                      "tag",
                      "project",
                      "milestone",
                      "team",
                      "none"
                    ],
                    "description": "How tickets are grouped. Defaults to status."
                  },
                  "orderBy": {
                    "type": "string",
                    "enum": ["manual", "created", "updated"],
                    "description": "Defaults to manual, the order people set."
                  },
                  "layout": {
                    "type": "string",
                    "enum": ["list", "board"],
                    "description": "Defaults to list."
                  },
                  "isDefault": {
                    "type": "boolean",
                    "enum": [true],
                    "description": "true makes this the view the owner's Tickets page opens."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": ["planning"],
        "operationId": "planning.deleteTeamView",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "team",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "view",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Delete a view that is not the default"
      }
    },
    "/v1/workspaces/{slug}/projects/{project}/views": {
      "get": {
        "tags": ["planning"],
        "operationId": "planning.listProjectViews",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "project",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["views"],
                  "properties": {
                    "views": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/View"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List a project's views"
      },
      "post": {
        "tags": ["planning"],
        "operationId": "planning.createProjectView",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "project",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "A saved way to look at a team's or a project's tickets.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "team",
                    "project",
                    "filters",
                    "groupBy",
                    "orderBy",
                    "layout",
                    "isDefault",
                    "createdAt",
                    "updatedAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "team": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": ["id", "key", "name"],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "project": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": ["id", "slug", "name"],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "filters": {
                      "$ref": "#/components/schemas/ViewFilters"
                    },
                    "groupBy": {
                      "type": "string",
                      "enum": [
                        "status",
                        "category",
                        "owner",
                        "tag",
                        "project",
                        "milestone",
                        "team",
                        "none"
                      ]
                    },
                    "orderBy": {
                      "type": "string",
                      "enum": ["manual", "created", "updated"]
                    },
                    "layout": {
                      "type": "string",
                      "enum": ["list", "board"]
                    },
                    "isDefault": {
                      "type": "boolean",
                      "description": "Whether the owner's Tickets page opens this view."
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false,
                  "description": "A saved way to look at a team's or a project's tickets."
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Save a view for a project",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name"],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "filters": {
                    "$ref": "#/components/schemas/ViewFilters"
                  },
                  "groupBy": {
                    "type": "string",
                    "enum": [
                      "status",
                      "category",
                      "owner",
                      "tag",
                      "project",
                      "milestone",
                      "team",
                      "none"
                    ],
                    "description": "How tickets are grouped. Defaults to status."
                  },
                  "orderBy": {
                    "type": "string",
                    "enum": ["manual", "created", "updated"],
                    "description": "Defaults to manual, the order people set."
                  },
                  "layout": {
                    "type": "string",
                    "enum": ["list", "board"],
                    "description": "Defaults to list."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/projects/{project}/views/{view}": {
      "get": {
        "tags": ["planning"],
        "operationId": "planning.getProjectView",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "project",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "view",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A view with its tickets, in its order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViewTickets"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Get a view with its tickets"
      },
      "patch": {
        "tags": ["planning"],
        "operationId": "planning.updateProjectView",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "project",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "view",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A saved way to look at a team's or a project's tickets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Change a view, or make it the default",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "filters": {
                    "$ref": "#/components/schemas/ViewFilters"
                  },
                  "groupBy": {
                    "type": "string",
                    "enum": [
                      "status",
                      "category",
                      "owner",
                      "tag",
                      "project",
                      "milestone",
                      "team",
                      "none"
                    ],
                    "description": "How tickets are grouped. Defaults to status."
                  },
                  "orderBy": {
                    "type": "string",
                    "enum": ["manual", "created", "updated"],
                    "description": "Defaults to manual, the order people set."
                  },
                  "layout": {
                    "type": "string",
                    "enum": ["list", "board"],
                    "description": "Defaults to list."
                  },
                  "isDefault": {
                    "type": "boolean",
                    "enum": [true],
                    "description": "true makes this the view the owner's Tickets page opens."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": ["planning"],
        "operationId": "planning.deleteProjectView",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "project",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "view",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Delete a view that is not the default"
      }
    },
    "/v1/workspaces/{slug}/tickets/{ticket}/reorder": {
      "post": {
        "tags": ["planning"],
        "operationId": "planning.reorderTicket",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "ticket",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The unit of work, with its plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Move a ticket in the one order every view ordered by hand uses",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "before": {
                    "type": "string"
                  },
                  "after": {
                    "type": "string"
                  }
                },
                "additionalProperties": false,
                "description": "Send before or after, not both."
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/agent-instructions": {
      "get": {
        "tags": ["planning"],
        "operationId": "planning.getAgentInstructions",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["ticket", "plan"],
              "description": "ticket or plan"
            },
            "required": true,
            "description": "ticket or plan"
          },
          {
            "name": "team",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "A team key; leave out for the workspace's instructions."
            },
            "required": false,
            "description": "A team key; leave out for the workspace's instructions."
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The ticket or plan instructions a team's agents follow.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInstructions"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "The team's own instructions, else the workspace's, else Clanker Ship's defaults. `source` says which.",
        "summary": "Get the instructions a team's agents follow"
      },
      "put": {
        "tags": ["planning"],
        "operationId": "planning.setAgentInstructions",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The ticket or plan instructions a team's agents follow.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInstructions"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Fields left out keep their current values, so a team's first change copies what it inherits. Owners and admins set the workspace's; a team's members set the team's.",
        "summary": "Set a workspace's or team's instructions",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["kind"],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": ["ticket", "plan"],
                    "description": "ticket or plan"
                  },
                  "team": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "A team key; leave out for the workspace's instructions."
                  },
                  "templates": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/InstructionTemplate"
                    }
                  },
                  "guidance": {
                    "type": "string"
                  },
                  "defaults": {
                    "$ref": "#/components/schemas/TicketDefaults"
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": ["planning"],
        "operationId": "planning.resetAgentInstructions",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["ticket", "plan"],
              "description": "ticket or plan"
            },
            "required": true,
            "description": "ticket or plan"
          },
          {
            "name": "team",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "A team key; leave out for the workspace's instructions."
            },
            "required": false,
            "description": "A team key; leave out for the workspace's instructions."
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The ticket or plan instructions a team's agents follow.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInstructions"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Removes the team's or workspace's own instructions and returns the ones that now apply.",
        "summary": "Go back to the inherited instructions"
      }
    },
    "/v1/workspaces/{slug}/agents": {
      "get": {
        "tags": ["messages"],
        "operationId": "messages.listAgents",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "person",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "me for your own agents."
            },
            "required": false,
            "description": "me for your own agents."
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["agents"],
                  "properties": {
                    "agents": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RegisteredAgent"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Agents that can own tickets and receive messages, with the computers they run on and which sessions are live.",
        "summary": "List registered agents"
      }
    },
    "/v1/workspaces/{slug}/agents/register": {
      "post": {
        "tags": ["messages"],
        "operationId": "messages.registerAgent",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "agent",
                    "computer",
                    "clientId",
                    "access_token",
                    "token_type",
                    "expires_in",
                    "refresh_token",
                    "scope"
                  ],
                  "properties": {
                    "agent": {
                      "$ref": "#/components/schemas/RegisteredAgent"
                    },
                    "computer": {
                      "type": "object",
                      "required": ["id", "name"],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    "clientId": {
                      "type": "string"
                    },
                    "access_token": {
                      "type": "string"
                    },
                    "token_type": {
                      "type": "string",
                      "enum": ["Bearer"]
                    },
                    "expires_in": {
                      "type": "number"
                    },
                    "refresh_token": {
                      "type": "string"
                    },
                    "scope": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "The plugin's CLI registers as the person's agent for a client and gets its own agent sign-in for /agent/v1.",
        "summary": "Register the plugin's agent on a computer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["client", "computer"],
                "properties": {
                  "client": {
                    "type": "string",
                    "enum": ["claude", "codex", "cursor"],
                    "description": "The client the plugin runs in."
                  },
                  "computer": {
                    "type": "string",
                    "description": "The computer's name, such as MacBook Pro."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/agents/{agent}/revoke": {
      "post": {
        "tags": ["messages"],
        "operationId": "messages.revokeAgent",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "agent",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["revoked", "agent", "declined"],
                  "properties": {
                    "revoked": {
                      "type": "boolean",
                      "enum": [true]
                    },
                    "agent": {
                      "type": "string"
                    },
                    "declined": {
                      "type": "number"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Its sign-ins end at once; waiting messages are declined and their senders told.",
        "summary": "Revoke one of your agents"
      }
    },
    "/v1/workspaces/{slug}/agent-messages": {
      "post": {
        "tags": ["messages"],
        "operationId": "messages.sendMessage",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "Work sent to an agent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "agent",
                    "computer",
                    "ticket",
                    "ask",
                    "note",
                    "commentId",
                    "sender",
                    "status",
                    "reply",
                    "createdAt",
                    "deliveredAt",
                    "completedAt",
                    "declinedAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "agent": {
                      "type": "object",
                      "required": ["id", "name", "person"],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "person": {
                          "$ref": "#/components/schemas/Person"
                        }
                      },
                      "additionalProperties": false
                    },
                    "computer": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": ["id", "name"],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The computer routing chose; null when the agent has none."
                    },
                    "ticket": {
                      "type": "object",
                      "required": ["id", "identifier", "title"],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "identifier": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    "ask": {
                      "type": "string",
                      "enum": ["draft", "refine", "plan", "build", "mention"]
                    },
                    "note": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "commentId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sender": {
                      "type": "object",
                      "required": ["person"],
                      "properties": {
                        "person": {
                          "$ref": "#/components/schemas/Person"
                        }
                      },
                      "additionalProperties": false
                    },
                    "status": {
                      "type": "string",
                      "enum": ["queued", "delivered", "completed", "declined"]
                    },
                    "reply": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "deliveredAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "declinedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": false,
                  "description": "Work sent to an agent."
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Queues the ticket in the agent's inbox and picks the computer that gets it. A revoked agent returns 409.",
        "summary": "Send a ticket to an agent",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["agent", "ticket", "ask"],
                "properties": {
                  "agent": {
                    "type": "string",
                    "description": "A registered agent's ID."
                  },
                  "ticket": {
                    "type": "string",
                    "description": "A ticket ID, such as WEB-33."
                  },
                  "ask": {
                    "type": "string",
                    "enum": ["draft", "refine", "plan", "build"],
                    "description": "What the agent should do with the ticket."
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/tickets/{ticket}/messages": {
      "get": {
        "tags": ["messages"],
        "operationId": "messages.listTicketMessages",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "ticket",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["messages"],
                  "properties": {
                    "messages": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AgentMessage"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List the messages sent about a ticket"
      }
    },
    "/v1/workspaces/{slug}/tickets/{ticket}/comments": {
      "get": {
        "tags": ["messages"],
        "operationId": "messages.listComments",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "ticket",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["comments"],
                  "properties": {
                    "comments": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TicketComment"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List a ticket's comments"
      },
      "post": {
        "tags": ["messages"],
        "operationId": "messages.createComment",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "ticket",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["comment", "messages"],
                  "properties": {
                    "comment": {
                      "$ref": "#/components/schemas/TicketComment"
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": ["agent", "name"],
                        "properties": {
                          "agent": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Comment on a ticket, mentioning agents",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["body"],
                "properties": {
                  "body": {
                    "type": "string",
                    "description": "Markdown. @Claude reaches your own Claude."
                  },
                  "mentions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Agent IDs to mention, a teammate's included."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/notifications": {
      "get": {
        "tags": ["messages"],
        "operationId": "messages.listNotifications",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["notifications"],
                  "properties": {
                    "notifications": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Notification"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List your notifications"
      }
    },
    "/v1/workspaces/{slug}/notifications/read": {
      "post": {
        "tags": ["messages"],
        "operationId": "messages.readNotifications",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["read"],
                  "properties": {
                    "read": {
                      "type": "number"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Mark your notifications read"
      }
    },
    "/v1/workspaces/{slug}/test-runs": {
      "get": {
        "tags": ["testRuns"],
        "operationId": "testRuns.listTestRuns",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "environment",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "result",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["passed", "failed", "flaky"]
            },
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Matches branch, commit subject, or the start of a commit SHA."
            },
            "required": false,
            "description": "Matches branch, commit subject, or the start of a commit SHA."
          },
          {
            "name": "commit",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "mine",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["true"]
            },
            "required": false
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "nextCursor from the previous page."
            },
            "required": false,
            "description": "nextCursor from the previous page."
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["runs", "nextCursor"],
                  "properties": {
                    "runs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TestRunSummary"
                      }
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "List test runs, newest first"
      },
      "post": {
        "tags": ["testRuns"],
        "operationId": "testRuns.startTestRun",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["number", "url"],
                  "properties": {
                    "number": {
                      "type": "number"
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Starts a run for a product's deployment in an environment. Upload its files, then finish it.",
        "summary": "Start a test run",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["product", "environment", "baseUrl", "git", "machine", "selection"],
                "properties": {
                  "product": {
                    "type": "string"
                  },
                  "environment": {
                    "type": "string"
                  },
                  "baseUrl": {
                    "type": "string"
                  },
                  "git": {
                    "type": "object",
                    "required": ["branch", "sha", "dirty", "subject"],
                    "properties": {
                      "branch": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "sha": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dirty": {
                        "type": "boolean"
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  "machine": {
                    "type": "object",
                    "required": ["hostname", "platform"],
                    "properties": {
                      "hostname": {
                        "type": "string"
                      },
                      "platform": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  },
                  "selection": {
                    "type": "object",
                    "required": ["coverage", "folders", "caseIds"],
                    "properties": {
                      "coverage": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": ["critical", "acceptance", "regression", "exhaustive"]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "folders": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "caseIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/test-runs/{run}": {
      "get": {
        "tags": ["testRuns"],
        "operationId": "testRuns.getTestRun",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "run",
            "in": "path",
            "schema": {
              "type": "string",
              "description": "a string to be decoded into a number"
            },
            "required": true,
            "description": "a string to be decoded into a number"
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A run with its retries and every test with its attempts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestRun"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Get a test run with its tests and attempts"
      }
    },
    "/v1/workspaces/{slug}/test-runs/{run}/finish": {
      "post": {
        "tags": ["testRuns"],
        "operationId": "testRuns.finishTestRun",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "run",
            "in": "path",
            "schema": {
              "type": "string",
              "description": "a string to be decoded into a number"
            },
            "required": true,
            "description": "a string to be decoded into a number"
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A published test run.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestRunSummary"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Finish a test run with every test's first attempt",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["interrupted", "durationMs", "tests"],
                "properties": {
                  "interrupted": {
                    "type": "boolean"
                  },
                  "error": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "What Playwright reported outside the tests, such as a web server that did not start. It fails the run."
                  },
                  "durationMs": {
                    "type": "number"
                  },
                  "tests": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "caseId",
                        "title",
                        "file",
                        "coverage",
                        "testKind",
                        "priority",
                        "files",
                        "attempt"
                      ],
                      "properties": {
                        "caseId": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "file": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "coverage": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": ["critical", "acceptance", "regression", "exhaustive"]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "testKind": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": ["behavior", "journey"]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "priority": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "files": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "attempt": {
                          "type": "object",
                          "required": [
                            "status",
                            "durationMs",
                            "startedAt",
                            "errorMessage",
                            "errorStack",
                            "files"
                          ],
                          "properties": {
                            "status": {
                              "type": "string",
                              "enum": ["passed", "failed", "timed_out", "interrupted", "skipped"]
                            },
                            "durationMs": {
                              "type": "number"
                            },
                            "startedAt": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "errorMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "errorStack": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "files": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Files uploaded under results/{case}/attempts/{n}/, such as video.webm."
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/test-runs/{run}/retries": {
      "post": {
        "tags": ["testRuns"],
        "operationId": "testRuns.startRetry",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "run",
            "in": "path",
            "schema": {
              "type": "string",
              "description": "a string to be decoded into a number"
            },
            "required": true,
            "description": "a string to be decoded into a number"
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["retry", "requiredPasses", "baseUrl", "tests"],
                  "properties": {
                    "retry": {
                      "type": "number"
                    },
                    "requiredPasses": {
                      "type": "number"
                    },
                    "baseUrl": {
                      "type": "string"
                    },
                    "tests": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": ["caseId", "title", "file", "nextAttempt"],
                        "properties": {
                          "caseId": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "file": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "nextAttempt": {
                            "type": "number",
                            "description": "The number the test's first retry attempt gets, for its file paths."
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "description": "Only a finished run with failed tests can be retried, on the commit it tested, one retry at a time.",
        "summary": "Retry a test run's failed tests",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["passes", "baseUrl", "git", "machine"],
                "properties": {
                  "passes": {
                    "type": "number",
                    "description": "Passing attempts a failed test needs to count as flaky, 1 to 5."
                  },
                  "baseUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Run against this URL instead of the run's."
                  },
                  "git": {
                    "type": "object",
                    "required": ["branch", "sha", "dirty", "subject"],
                    "properties": {
                      "branch": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "sha": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dirty": {
                        "type": "boolean"
                      },
                      "subject": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  "machine": {
                    "type": "object",
                    "required": ["hostname", "platform"],
                    "properties": {
                      "hostname": {
                        "type": "string"
                      },
                      "platform": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/workspaces/{slug}/test-runs/{run}/retries/{retry}/finish": {
      "post": {
        "tags": ["testRuns"],
        "operationId": "testRuns.finishRetry",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "run",
            "in": "path",
            "schema": {
              "type": "string",
              "description": "a string to be decoded into a number"
            },
            "required": true,
            "description": "a string to be decoded into a number"
          },
          {
            "name": "retry",
            "in": "path",
            "schema": {
              "type": "string",
              "description": "a string to be decoded into a number"
            },
            "required": true,
            "description": "a string to be decoded into a number"
          }
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A published test run.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestRunSummary"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Finish a retry and apply the flaky rule",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["interrupted", "tests"],
                "properties": {
                  "interrupted": {
                    "type": "boolean"
                  },
                  "tests": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": ["caseId", "attempts"],
                      "properties": {
                        "caseId": {
                          "type": "string"
                        },
                        "attempts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "status",
                              "durationMs",
                              "startedAt",
                              "errorMessage",
                              "errorStack",
                              "files"
                            ],
                            "properties": {
                              "status": {
                                "type": "string",
                                "enum": ["passed", "failed", "timed_out", "interrupted", "skipped"]
                              },
                              "durationMs": {
                                "type": "number"
                              },
                              "startedAt": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "errorMessage": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "errorStack": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "files": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Files uploaded under results/{case}/attempts/{n}/, such as video.webm."
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/invites/{token}": {
      "get": {
        "tags": ["invites"],
        "operationId": "invites.inviteByToken",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "/schemas/unknown",
                  "title": "unknown"
                }
              }
            }
          },
          "400": {
            "description": "The request did not match the expected schema",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidInput"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Internal"
                }
              }
            }
          }
        },
        "summary": "Get invite by token"
      }
    }
  },
  "components": {
    "schemas": {
      "HttpApiDecodeError": {
        "type": "object",
        "required": ["issues", "message", "_tag"],
        "properties": {
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Issue"
            }
          },
          "message": {
            "type": "string"
          },
          "_tag": {
            "type": "string",
            "enum": ["HttpApiDecodeError"]
          }
        },
        "additionalProperties": false,
        "description": "The request did not match the expected schema"
      },
      "Issue": {
        "type": "object",
        "required": ["_tag", "path", "message"],
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "Pointer",
              "Unexpected",
              "Missing",
              "Composite",
              "Refinement",
              "Transformation",
              "Type",
              "Forbidden"
            ],
            "description": "The tag identifying the type of parse issue"
          },
          "path": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PropertyKey"
            },
            "description": "The path to the property where the issue occurred"
          },
          "message": {
            "type": "string",
            "description": "A descriptive message explaining the issue"
          }
        },
        "additionalProperties": false,
        "description": "Represents an error encountered while parsing a value to match the schema"
      },
      "PropertyKey": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "object",
            "required": ["_tag", "key"],
            "properties": {
              "_tag": {
                "type": "string",
                "enum": ["symbol"]
              },
              "key": {
                "type": "string"
              }
            },
            "additionalProperties": false,
            "description": "an object to be decoded into a globally shared symbol"
          }
        ]
      },
      "InvalidInput": {
        "type": "object",
        "required": ["message", "_tag"],
        "properties": {
          "message": {
            "type": "string"
          },
          "_tag": {
            "type": "string",
            "enum": ["InvalidInput"]
          }
        },
        "additionalProperties": false,
        "description": "Invalid request"
      },
      "Unauthorized": {
        "type": "object",
        "required": ["message", "_tag"],
        "properties": {
          "message": {
            "type": "string"
          },
          "_tag": {
            "type": "string",
            "enum": ["Unauthorized"]
          }
        },
        "additionalProperties": false,
        "description": "API key required"
      },
      "Forbidden": {
        "type": "object",
        "required": ["message", "_tag"],
        "properties": {
          "message": {
            "type": "string"
          },
          "_tag": {
            "type": "string",
            "enum": ["Forbidden"]
          }
        },
        "additionalProperties": false,
        "description": "Not allowed"
      },
      "NotFound": {
        "type": "object",
        "required": ["message", "_tag"],
        "properties": {
          "message": {
            "type": "string"
          },
          "_tag": {
            "type": "string",
            "enum": ["NotFound"]
          }
        },
        "additionalProperties": false,
        "description": "Missing"
      },
      "Conflict": {
        "type": "object",
        "required": ["message", "_tag"],
        "properties": {
          "message": {
            "type": "string"
          },
          "_tag": {
            "type": "string",
            "enum": ["Conflict"]
          }
        },
        "additionalProperties": false,
        "description": "Conflict"
      },
      "Internal": {
        "type": "object",
        "required": ["message", "_tag"],
        "properties": {
          "message": {
            "type": "string"
          },
          "_tag": {
            "type": "string",
            "enum": ["Internal"]
          }
        },
        "additionalProperties": false,
        "description": "Server error"
      },
      "Int": {
        "type": "integer",
        "description": "an integer",
        "title": "int"
      },
      "Product": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "type",
          "description",
          "repository",
          "archivedAt",
          "createdAt",
          "updatedAt",
          "deployments"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": ["website", "api", "cli", "mobile_app", "desktop_app", "agent"]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "repository": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The source repository, such as acme/storefront, that agent sessions report."
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "deployments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Deployment"
            },
            "description": "Deployments whose environment is active."
          }
        },
        "additionalProperties": false,
        "description": "Software the workspace tests."
      },
      "Deployment": {
        "type": "object",
        "required": [
          "id",
          "product",
          "environment",
          "baseUrl",
          "version",
          "versionUpdatedAt",
          "active",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "product": {
            "type": "object",
            "required": ["id", "slug", "name", "type", "archived"],
            "properties": {
              "id": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": ["website", "api", "cli", "mobile_app", "desktop_app", "agent"]
              },
              "archived": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "environment": {
            "type": "object",
            "required": ["id", "slug", "name", "class", "emoji", "archived"],
            "properties": {
              "id": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "class": {
                "type": "string",
                "enum": ["production", "non-production"]
              },
              "emoji": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "archived": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "baseUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "versionUpdatedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "active": {
            "type": "boolean",
            "description": "False while the product or the environment is archived."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "One product running in one environment."
      },
      "Environment": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "class",
          "description",
          "emoji",
          "archivedAt",
          "createdAt",
          "updatedAt",
          "deployments"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "class": {
            "type": "string",
            "enum": ["production", "non-production"]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "emoji": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "deployments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Deployment"
            },
            "description": "Deployments whose product is active."
          }
        },
        "additionalProperties": false,
        "description": "A place products run, shared by every product in the workspace."
      },
      "Team": {
        "type": "object",
        "required": [
          "id",
          "key",
          "name",
          "visibility",
          "archivedAt",
          "members",
          "joined",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string",
            "description": "2–5 capital letters that prefix ticket IDs."
          },
          "name": {
            "type": "string"
          },
          "visibility": {
            "type": "string",
            "enum": ["open", "private"]
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Person"
            }
          },
          "joined": {
            "type": "boolean",
            "description": "Whether the caller is a member."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "A group of members that numbers its tickets."
      },
      "Person": {
        "type": "object",
        "required": ["id", "name", "email"],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "A workspace member."
      },
      "TicketStatus": {
        "type": "object",
        "required": ["id", "name", "category", "position", "isDefault"],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "enum": ["backlog", "unstarted", "started", "completed", "canceled"]
          },
          "position": {
            "type": "number"
          },
          "isDefault": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Tag": {
        "type": "object",
        "required": ["id", "name", "color", "team"],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string",
            "enum": ["gray", "red", "orange", "amber", "green", "teal", "cobalt", "iris", "pink"]
          },
          "team": {
            "anyOf": [
              {
                "type": "object",
                "required": ["id", "key"],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "The team a team tag belongs to; null for workspace tags."
          }
        },
        "additionalProperties": false
      },
      "Project": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "summary",
          "status",
          "lead",
          "targetDate",
          "teams",
          "products",
          "milestones",
          "progress",
          "archivedAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": ["planned", "active", "paused", "completed", "canceled"]
          },
          "lead": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Person"
              },
              {
                "type": "null"
              }
            ]
          },
          "targetDate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "teams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamRef"
            }
          },
          "products": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["id", "slug", "name"],
              "properties": {
                "id": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "milestones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Milestone"
            }
          },
          "progress": {
            "type": "object",
            "required": ["backlog", "unstarted", "started", "completed", "canceled"],
            "properties": {
              "backlog": {
                "type": "number"
              },
              "unstarted": {
                "type": "number"
              },
              "started": {
                "type": "number"
              },
              "completed": {
                "type": "number"
              },
              "canceled": {
                "type": "number"
              }
            },
            "additionalProperties": false,
            "description": "The project's tickets counted by status category."
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "A body of work with a goal. It links the teams whose tickets it holds."
      },
      "TeamRef": {
        "type": "object",
        "required": ["id", "key", "name", "visibility"],
        "properties": {
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "visibility": {
            "type": "string",
            "enum": ["open", "private"]
          }
        },
        "additionalProperties": false
      },
      "Milestone": {
        "type": "object",
        "required": ["id", "number", "name", "summary"],
        "properties": {
          "id": {
            "type": "string"
          },
          "number": {
            "type": "number",
            "description": "Numbered within the project: 2 is M2."
          },
          "name": {
            "type": "string"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "ProjectDetail": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "summary",
          "status",
          "lead",
          "targetDate",
          "teams",
          "products",
          "milestones",
          "progress",
          "archivedAt",
          "createdAt",
          "updatedAt",
          "document"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": ["planned", "active", "paused", "completed", "canceled"]
          },
          "lead": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Person"
              },
              {
                "type": "null"
              }
            ]
          },
          "targetDate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "teams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamRef"
            }
          },
          "products": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["id", "slug", "name"],
              "properties": {
                "id": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "milestones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Milestone"
            }
          },
          "progress": {
            "type": "object",
            "required": ["backlog", "unstarted", "started", "completed", "canceled"],
            "properties": {
              "backlog": {
                "type": "number"
              },
              "unstarted": {
                "type": "number"
              },
              "started": {
                "type": "number"
              },
              "completed": {
                "type": "number"
              },
              "canceled": {
                "type": "number"
              }
            },
            "additionalProperties": false,
            "description": "The project's tickets counted by status category."
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "document": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Markdown."
          }
        },
        "additionalProperties": false,
        "description": "A project with its document."
      },
      "TicketListItem": {
        "type": "object",
        "required": [
          "id",
          "identifier",
          "number",
          "team",
          "title",
          "summary",
          "status",
          "owner",
          "project",
          "milestone",
          "tags",
          "rank",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "identifier": {
            "type": "string",
            "description": "The team key and number, such as WEB-31."
          },
          "number": {
            "type": "number"
          },
          "team": {
            "$ref": "#/components/schemas/TeamRef"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/TicketStatus"
          },
          "owner": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Agent"
              },
              {
                "type": "null"
              }
            ]
          },
          "project": {
            "anyOf": [
              {
                "type": "object",
                "required": ["id", "slug", "name"],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "milestone": {
            "anyOf": [
              {
                "type": "object",
                "required": ["id", "number", "name"],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "number": {
                    "type": "number"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          },
          "rank": {
            "type": "number"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "A ticket without its plan, as lists return it."
      },
      "Agent": {
        "type": "object",
        "required": ["id", "name", "person"],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The coding agent, such as Codex."
          },
          "person": {
            "$ref": "#/components/schemas/Person"
          }
        },
        "additionalProperties": false,
        "description": "A registered agent: one coding agent working for one workspace member."
      },
      "Ticket": {
        "type": "object",
        "required": [
          "id",
          "identifier",
          "number",
          "team",
          "title",
          "summary",
          "status",
          "owner",
          "project",
          "milestone",
          "tags",
          "rank",
          "createdAt",
          "updatedAt",
          "plan",
          "createdBy",
          "formerIdentifiers"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "identifier": {
            "type": "string",
            "description": "The team key and number, such as WEB-31."
          },
          "number": {
            "type": "number"
          },
          "team": {
            "$ref": "#/components/schemas/TeamRef"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/TicketStatus"
          },
          "owner": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Agent"
              },
              {
                "type": "null"
              }
            ]
          },
          "project": {
            "anyOf": [
              {
                "type": "object",
                "required": ["id", "slug", "name"],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "milestone": {
            "anyOf": [
              {
                "type": "object",
                "required": ["id", "number", "name"],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "number": {
                    "type": "number"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          },
          "rank": {
            "type": "number"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "plan": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Markdown."
          },
          "createdBy": {
            "type": "object",
            "required": ["person", "agent"],
            "properties": {
              "person": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Person"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "agent": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Agent"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          "formerIdentifiers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs the ticket had on other teams; each still finds it."
          }
        },
        "additionalProperties": false,
        "description": "The unit of work, with its plan."
      },
      "View": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "team",
          "project",
          "filters",
          "groupBy",
          "orderBy",
          "layout",
          "isDefault",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "team": {
            "anyOf": [
              {
                "type": "object",
                "required": ["id", "key", "name"],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "project": {
            "anyOf": [
              {
                "type": "object",
                "required": ["id", "slug", "name"],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "filters": {
            "$ref": "#/components/schemas/ViewFilters"
          },
          "groupBy": {
            "type": "string",
            "enum": ["status", "category", "owner", "tag", "project", "milestone", "team", "none"]
          },
          "orderBy": {
            "type": "string",
            "enum": ["manual", "created", "updated"]
          },
          "layout": {
            "type": "string",
            "enum": ["list", "board"]
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether the owner's Tickets page opens this view."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "A saved way to look at a team's or a project's tickets."
      },
      "ViewFilters": {
        "type": "object",
        "required": [],
        "properties": {
          "statuses": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Status names."
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Status categories: backlog, unstarted, started, completed, canceled."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tag names."
          },
          "owners": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Agent IDs, or none."
          },
          "projects": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Project slugs, or none. Team views only."
          },
          "milestones": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Milestone labels such as M1, or none. Project views only."
          },
          "teams": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Team keys. Project views only."
          }
        },
        "additionalProperties": false,
        "description": "Filters combine with and; the values within one filter with or."
      },
      "ViewTickets": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "team",
          "project",
          "filters",
          "groupBy",
          "orderBy",
          "layout",
          "isDefault",
          "createdAt",
          "updatedAt",
          "tickets",
          "statuses"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "team": {
            "anyOf": [
              {
                "type": "object",
                "required": ["id", "key", "name"],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "project": {
            "anyOf": [
              {
                "type": "object",
                "required": ["id", "slug", "name"],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "filters": {
            "$ref": "#/components/schemas/ViewFilters"
          },
          "groupBy": {
            "type": "string",
            "enum": ["status", "category", "owner", "tag", "project", "milestone", "team", "none"]
          },
          "orderBy": {
            "type": "string",
            "enum": ["manual", "created", "updated"]
          },
          "layout": {
            "type": "string",
            "enum": ["list", "board"]
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether the owner's Tickets page opens this view."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "tickets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TicketListItem"
            }
          },
          "statuses": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TicketStatus"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "The columns a status grouping shows; null for a project whose teams' statuses differ, which groups by category instead."
          }
        },
        "additionalProperties": false,
        "description": "A view with its tickets, in its order."
      },
      "AgentInstructions": {
        "type": "object",
        "required": [
          "kind",
          "source",
          "team",
          "templates",
          "guidance",
          "defaults",
          "updatedAt",
          "updatedBy"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": ["ticket", "plan"]
          },
          "source": {
            "type": "string",
            "enum": ["team", "workspace", "default"],
            "description": "Where these come from: the team's own, the workspace's, or Clanker Ship's defaults."
          },
          "team": {
            "anyOf": [
              {
                "type": "object",
                "required": ["id", "key", "name"],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "templates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InstructionTemplate"
            }
          },
          "guidance": {
            "type": "string",
            "description": "How the agent should write, in Markdown."
          },
          "defaults": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TicketDefaults"
              },
              {
                "type": "null"
              }
            ],
            "description": "Ticket instructions only."
          },
          "updatedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "updatedBy": {
            "anyOf": [
              {
                "type": "object",
                "required": ["person", "agent"],
                "properties": {
                  "person": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Person"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "agent": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Agent"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "The ticket or plan instructions a team's agents follow."
      },
      "InstructionTemplate": {
        "type": "object",
        "required": ["tag", "body"],
        "properties": {
          "tag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tag whose tickets use this template; null for every other ticket."
          },
          "body": {
            "type": "string",
            "description": "Markdown the summary or plan starts from."
          }
        },
        "additionalProperties": false
      },
      "TicketDefaults": {
        "type": "object",
        "required": ["status", "tags", "owner"],
        "properties": {
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A status name; null keeps the team's default status."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "owner": {
            "type": "string",
            "enum": ["creator", "none"],
            "description": "creator makes the agent that creates the ticket its owner."
          }
        },
        "additionalProperties": false,
        "description": "What a ticket an agent creates gets unless the agent names other values."
      },
      "RegisteredAgent": {
        "type": "object",
        "required": [
          "id",
          "name",
          "person",
          "computers",
          "serverUrl",
          "live",
          "lastSeenAt",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The client, such as Claude Code."
          },
          "person": {
            "$ref": "#/components/schemas/Person"
          },
          "computers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentComputer"
            }
          },
          "serverUrl": {
            "type": "boolean",
            "description": "Signed in with the server URL as well as, or instead of, through the plugin."
          },
          "live": {
            "type": "boolean"
          },
          "lastSeenAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "One client working for one person. It owns tickets and receives messages."
      },
      "AgentComputer": {
        "type": "object",
        "required": ["id", "name", "lastSeenAt", "live", "sessions"],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "lastSeenAt": {
            "type": "string"
          },
          "live": {
            "type": "boolean"
          },
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentSession"
            }
          }
        },
        "additionalProperties": false
      },
      "AgentSession": {
        "type": "object",
        "required": ["id", "repository", "branch", "lastSeenAt", "live"],
        "properties": {
          "id": {
            "type": "string"
          },
          "repository": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastSeenAt": {
            "type": "string"
          },
          "live": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "AgentMessage": {
        "type": "object",
        "required": [
          "id",
          "agent",
          "computer",
          "ticket",
          "ask",
          "note",
          "commentId",
          "sender",
          "status",
          "reply",
          "createdAt",
          "deliveredAt",
          "completedAt",
          "declinedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "agent": {
            "type": "object",
            "required": ["id", "name", "person"],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "person": {
                "$ref": "#/components/schemas/Person"
              }
            },
            "additionalProperties": false
          },
          "computer": {
            "anyOf": [
              {
                "type": "object",
                "required": ["id", "name"],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "The computer routing chose; null when the agent has none."
          },
          "ticket": {
            "type": "object",
            "required": ["id", "identifier", "title"],
            "properties": {
              "id": {
                "type": "string"
              },
              "identifier": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "ask": {
            "type": "string",
            "enum": ["draft", "refine", "plan", "build", "mention"]
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "commentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sender": {
            "type": "object",
            "required": ["person"],
            "properties": {
              "person": {
                "$ref": "#/components/schemas/Person"
              }
            },
            "additionalProperties": false
          },
          "status": {
            "type": "string",
            "enum": ["queued", "delivered", "completed", "declined"]
          },
          "reply": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "deliveredAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "declinedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "Work sent to an agent."
      },
      "TicketComment": {
        "type": "object",
        "required": ["id", "body", "author", "createdAt"],
        "properties": {
          "id": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "author": {
            "type": "object",
            "required": ["person", "agent"],
            "properties": {
              "person": {
                "$ref": "#/components/schemas/Person"
              },
              "agent": {
                "anyOf": [
                  {
                    "type": "object",
                    "required": ["id", "name"],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          "createdAt": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "Notification": {
        "type": "object",
        "required": ["id", "kind", "message", "readAt", "createdAt"],
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": ["message_received", "message_completed", "message_declined"]
          },
          "message": {
            "$ref": "#/components/schemas/AgentMessage"
          },
          "readAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TestRunSummary": {
        "type": "object",
        "required": [
          "id",
          "number",
          "url",
          "state",
          "result",
          "counts",
          "passRate",
          "firstAttemptPassRate",
          "error",
          "product",
          "environment",
          "baseUrl",
          "deploymentBaseUrl",
          "deploymentVersion",
          "git",
          "machine",
          "coverage",
          "publishedBy",
          "startedAt",
          "finishedAt",
          "durationMs"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "number": {
            "type": "number"
          },
          "url": {
            "type": "string",
            "description": "The run's page on the website."
          },
          "state": {
            "type": "string",
            "enum": ["running", "finished", "interrupted"]
          },
          "result": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["passed", "failed"]
              },
              {
                "type": "null"
              }
            ]
          },
          "counts": {
            "type": "object",
            "required": ["total", "passed", "flaky", "failed", "skipped"],
            "properties": {
              "total": {
                "type": "number"
              },
              "passed": {
                "type": "number"
              },
              "flaky": {
                "type": "number"
              },
              "failed": {
                "type": "number"
              },
              "skipped": {
                "type": "number"
              }
            },
            "additionalProperties": false
          },
          "passRate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "(passed + flaky) ÷ (tests − skipped), from 0 to 1."
          },
          "firstAttemptPassRate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tests that passed on attempt 1 ÷ (tests − skipped). Retries never change it."
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What failed outside the tests, such as a web server that did not start, or `No tests ran.` A run with an error is failed and cannot be retried."
          },
          "product": {
            "type": "object",
            "required": ["slug", "name"],
            "properties": {
              "slug": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "environment": {
            "type": "object",
            "required": ["slug", "name", "class"],
            "properties": {
              "slug": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "class": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "baseUrl": {
            "type": "string",
            "description": "The URL the tests ran against."
          },
          "deploymentBaseUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The deployment's URL when the run started. It differs from baseUrl when --base-url overrode it."
          },
          "deploymentVersion": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "git": {
            "type": "object",
            "required": ["branch", "sha", "dirty", "subject"],
            "properties": {
              "branch": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "sha": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dirty": {
                "type": "boolean"
              },
              "subject": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          "machine": {
            "type": "object",
            "required": ["hostname", "platform"],
            "properties": {
              "hostname": {
                "type": "string"
              },
              "platform": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "coverage": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["critical", "acceptance", "regression", "exhaustive"]
              },
              {
                "type": "null"
              }
            ]
          },
          "publishedBy": {
            "$ref": "#/components/schemas/TestRunPublisher"
          },
          "startedAt": {
            "type": "string"
          },
          "finishedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "durationMs": {
            "type": "number"
          }
        },
        "additionalProperties": false,
        "description": "A published test run."
      },
      "TestRunPublisher": {
        "anyOf": [
          {
            "type": "object",
            "required": ["kind", "name", "email"],
            "properties": {
              "kind": {
                "type": "string",
                "enum": ["user"]
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": ["kind", "name"],
            "properties": {
              "kind": {
                "type": "string",
                "enum": ["account_key"]
              },
              "name": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": ["kind"],
            "properties": {
              "kind": {
                "type": "string",
                "enum": ["removed"]
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "Who published a run or a retry."
      },
      "TestRun": {
        "type": "object",
        "required": [
          "id",
          "number",
          "url",
          "state",
          "result",
          "counts",
          "passRate",
          "firstAttemptPassRate",
          "error",
          "product",
          "environment",
          "baseUrl",
          "deploymentBaseUrl",
          "deploymentVersion",
          "git",
          "machine",
          "coverage",
          "publishedBy",
          "startedAt",
          "finishedAt",
          "durationMs",
          "retries",
          "tests"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "number": {
            "type": "number"
          },
          "url": {
            "type": "string",
            "description": "The run's page on the website."
          },
          "state": {
            "type": "string",
            "enum": ["running", "finished", "interrupted"]
          },
          "result": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["passed", "failed"]
              },
              {
                "type": "null"
              }
            ]
          },
          "counts": {
            "type": "object",
            "required": ["total", "passed", "flaky", "failed", "skipped"],
            "properties": {
              "total": {
                "type": "number"
              },
              "passed": {
                "type": "number"
              },
              "flaky": {
                "type": "number"
              },
              "failed": {
                "type": "number"
              },
              "skipped": {
                "type": "number"
              }
            },
            "additionalProperties": false
          },
          "passRate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "(passed + flaky) ÷ (tests − skipped), from 0 to 1."
          },
          "firstAttemptPassRate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tests that passed on attempt 1 ÷ (tests − skipped). Retries never change it."
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What failed outside the tests, such as a web server that did not start, or `No tests ran.` A run with an error is failed and cannot be retried."
          },
          "product": {
            "type": "object",
            "required": ["slug", "name"],
            "properties": {
              "slug": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "environment": {
            "type": "object",
            "required": ["slug", "name", "class"],
            "properties": {
              "slug": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "class": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "baseUrl": {
            "type": "string",
            "description": "The URL the tests ran against."
          },
          "deploymentBaseUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The deployment's URL when the run started. It differs from baseUrl when --base-url overrode it."
          },
          "deploymentVersion": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "git": {
            "type": "object",
            "required": ["branch", "sha", "dirty", "subject"],
            "properties": {
              "branch": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "sha": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dirty": {
                "type": "boolean"
              },
              "subject": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          "machine": {
            "type": "object",
            "required": ["hostname", "platform"],
            "properties": {
              "hostname": {
                "type": "string"
              },
              "platform": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "coverage": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["critical", "acceptance", "regression", "exhaustive"]
              },
              {
                "type": "null"
              }
            ]
          },
          "publishedBy": {
            "$ref": "#/components/schemas/TestRunPublisher"
          },
          "startedAt": {
            "type": "string"
          },
          "finishedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "durationMs": {
            "type": "number"
          },
          "retries": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "number",
                "state",
                "requiredPasses",
                "testCount",
                "flakyCount",
                "baseUrl",
                "gitSha",
                "publishedBy",
                "startedAt",
                "finishedAt"
              ],
              "properties": {
                "number": {
                  "type": "number"
                },
                "state": {
                  "type": "string",
                  "enum": ["running", "finished", "interrupted"]
                },
                "requiredPasses": {
                  "type": "number"
                },
                "testCount": {
                  "type": "number"
                },
                "flakyCount": {
                  "type": "number"
                },
                "baseUrl": {
                  "type": "string"
                },
                "gitSha": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "publishedBy": {
                  "$ref": "#/components/schemas/TestRunPublisher"
                },
                "startedAt": {
                  "type": "string"
                },
                "finishedAt": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "tests": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "caseId",
                "title",
                "file",
                "coverage",
                "testKind",
                "priority",
                "status",
                "durationMs",
                "errorMessage",
                "files",
                "attempts"
              ],
              "properties": {
                "caseId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "file": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "coverage": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": ["critical", "acceptance", "regression", "exhaustive"]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "testKind": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": ["behavior", "journey"]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "priority": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": ["failed", "flaky", "passed", "skipped"]
                },
                "durationMs": {
                  "type": "number"
                },
                "errorMessage": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "files": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "attempts": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TestAttempt"
                  }
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false,
        "description": "A run with its retries and every test with its attempts."
      },
      "TestAttempt": {
        "type": "object",
        "required": [
          "number",
          "retry",
          "status",
          "durationMs",
          "startedAt",
          "errorMessage",
          "errorStack",
          "files"
        ],
        "properties": {
          "number": {
            "type": "number"
          },
          "retry": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "The retry that ran this attempt, or null for the run itself."
          },
          "status": {
            "type": "string",
            "enum": ["passed", "failed", "timed_out", "interrupted", "skipped"]
          },
          "durationMs": {
            "type": "number"
          },
          "startedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "errorMessage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "errorStack": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "files": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      },
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [],
  "tags": [
    {
      "name": "vault"
    },
    {
      "name": "vaultPull"
    },
    {
      "name": "system"
    },
    {
      "name": "apiKeys"
    },
    {
      "name": "me"
    },
    {
      "name": "workspaces"
    },
    {
      "name": "catalog"
    },
    {
      "name": "planning"
    },
    {
      "name": "messages"
    },
    {
      "name": "testRuns"
    },
    {
      "name": "invites"
    }
  ],
  "servers": [
    {
      "url": "https://api.clankertest.com",
      "description": "Production"
    },
    {
      "url": "https://api.qa.clankership.net",
      "description": "QA"
    },
    {
      "url": "http://127.0.0.1:3200",
      "description": "Localhost"
    }
  ]
}
