{
  "openapi": "3.1.0",
  "info": {
    "title": "Depot API",
    "description": "Depot HTTP API v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.mesa.dev/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key"
      }
    }
  },
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/whoami": {
      "get": {
        "operationId": "whoami",
        "tags": [
          "Org"
        ],
        "summary": "Get caller identity",
        "description": "Get the authenticated organization, effective scopes, and API key metadata",
        "x-mint": {
          "metadata": {
            "title": "whoami"
          },
          "content": "<Note>**Required scope:** `read`</Note>"
        },
        "responses": {
          "200": {
            "description": "Caller identity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "org": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "slug",
                        "name"
                      ]
                    },
                    "key_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "key_name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "org",
                    "key_id",
                    "key_name",
                    "scopes"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/{org}/api-keys": {
      "post": {
        "operationId": "createApiKey",
        "tags": [
          "Org"
        ],
        "summary": "Create API key",
        "description": "Create a new API key for programmatic access",
        "responses": {
          "201": {
            "description": "API key created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "key": {
                      "type": "string"
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "repo_ids": {
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "key",
                    "name",
                    "scopes",
                    "repo_ids",
                    "tags",
                    "created_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `admin`</Note>"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "read",
                        "write",
                        "admin"
                      ]
                    }
                  },
                  "repo_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "expires_in_seconds": {
                    "type": "integer",
                    "minimum": 100,
                    "maximum": 31536000,
                    "description": "Expiration time in seconds. Must be between 100 and 31536000 (365 days)."
                  },
                  "tags": {
                    "description": "API key tags. Keys must not start with \"$\" (reserved for tag filter operators).",
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 256
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "org",
            "required": true
          }
        ]
      },
      "get": {
        "operationId": "listApiKeys",
        "tags": [
          "Org"
        ],
        "summary": "List API keys",
        "description": "List all API keys for the organization (key values are not returned)",
        "responses": {
          "200": {
            "description": "API keys list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Cursor for the next page, or null when no more results remain"
                    },
                    "has_more": {
                      "type": "boolean",
                      "description": "Whether another page of results is available"
                    },
                    "api_keys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "repo_ids": {
                            "anyOf": [
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "metadata": {
                            "anyOf": [
                              {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tags": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "last_used_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "expires_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "revoked_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "scopes",
                          "repo_ids",
                          "metadata",
                          "tags",
                          "last_used_at",
                          "expires_at",
                          "revoked_at",
                          "created_at"
                        ]
                      }
                    }
                  },
                  "required": [
                    "next_cursor",
                    "has_more",
                    "api_keys"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `admin`</Note>"
        },
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor from a previous response"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Maximum number of items to return (max 200)"
          },
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Filter API keys by name"
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "active",
                "revoked",
                "expired",
                "all"
              ]
            }
          },
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "type": "string",
              "enum": [
                "read",
                "write",
                "admin"
              ]
            },
            "description": "Filter API keys by scope membership"
          },
          {
            "in": "query",
            "name": "repo_id",
            "schema": {
              "type": "string"
            },
            "description": "Filter API keys scoped to a specific repository id"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "org",
            "required": true
          }
        ]
      }
    },
    "/{org}/api-keys/{id}": {
      "delete": {
        "operationId": "revokeApiKey",
        "tags": [
          "Org"
        ],
        "summary": "Revoke API key",
        "description": "Revoke an API key by its ID",
        "responses": {
          "200": {
            "description": "API key revoked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `admin`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "org",
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "updateApiKey",
        "tags": [
          "Org"
        ],
        "summary": "Update API key tags",
        "description": "Add, update, or remove tags on an API key. Set a tag value to null to remove it.",
        "responses": {
          "200": {
            "description": "Updated tags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tags": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "tags"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `admin`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "org",
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tags": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 256
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Tag patch: string values set tags, null removes them. Keys must not start with \"$\" (reserved for tag filter operators)."
                  }
                },
                "required": [
                  "tags"
                ]
              }
            }
          }
        }
      }
    },
    "/{org}/webhook-targets": {
      "get": {
        "operationId": "listWebhookTargets",
        "tags": [
          "Webhook Target"
        ],
        "summary": "List webhook targets",
        "description": "List webhook targets configured for the organization",
        "responses": {
          "200": {
            "description": "Webhook target list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Cursor for the next page, or null when no more results remain"
                    },
                    "has_more": {
                      "type": "boolean",
                      "description": "Whether another page of results is available"
                    },
                    "webhook_targets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "url": {
                            "type": "string"
                          },
                          "events": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "repo.created",
                                "repo.updated",
                                "repo.deleted",
                                "bookmark.created",
                                "bookmark.deleted",
                                "bookmark.moved",
                                "bookmark.merged",
                                "change.created",
                                "change.evolved",
                                "push",
                                "sync.queued",
                                "sync.in_progress",
                                "sync.completed",
                                "sync.failed"
                              ]
                            }
                          },
                          "repo_ids": {
                            "anyOf": [
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "url",
                          "events",
                          "repo_ids",
                          "created_at",
                          "updated_at"
                        ]
                      }
                    }
                  },
                  "required": [
                    "next_cursor",
                    "has_more",
                    "webhook_targets"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `admin`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor from a previous response"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Maximum number of items to return (max 200)"
          }
        ]
      },
      "post": {
        "operationId": "createWebhookTarget",
        "tags": [
          "Webhook Target"
        ],
        "summary": "Create webhook target",
        "description": "Create a webhook target for the organization",
        "responses": {
          "201": {
            "description": "Webhook target created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "url": {
                      "type": "string"
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "repo.created",
                          "repo.updated",
                          "repo.deleted",
                          "bookmark.created",
                          "bookmark.deleted",
                          "bookmark.moved",
                          "bookmark.merged",
                          "change.created",
                          "change.evolved",
                          "push",
                          "sync.queued",
                          "sync.in_progress",
                          "sync.completed",
                          "sync.failed"
                        ]
                      }
                    },
                    "repo_ids": {
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "secret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "url",
                    "events",
                    "repo_ids",
                    "created_at",
                    "updated_at",
                    "secret"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `admin`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "events": {
                    "default": [
                      "push"
                    ],
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "repo.created",
                        "repo.updated",
                        "repo.deleted",
                        "bookmark.created",
                        "bookmark.deleted",
                        "bookmark.moved",
                        "bookmark.merged",
                        "change.created",
                        "change.evolved",
                        "push",
                        "sync.queued",
                        "sync.in_progress",
                        "sync.completed",
                        "sync.failed"
                      ]
                    }
                  },
                  "repo_ids": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        }
      }
    },
    "/{org}/webhook-targets/{webhookTargetId}": {
      "get": {
        "operationId": "getWebhookTarget",
        "tags": [
          "Webhook Target"
        ],
        "summary": "Get webhook target",
        "description": "Get a webhook target by ID",
        "responses": {
          "200": {
            "description": "Webhook target",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "url": {
                      "type": "string"
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "repo.created",
                          "repo.updated",
                          "repo.deleted",
                          "bookmark.created",
                          "bookmark.deleted",
                          "bookmark.moved",
                          "bookmark.merged",
                          "change.created",
                          "change.evolved",
                          "push",
                          "sync.queued",
                          "sync.in_progress",
                          "sync.completed",
                          "sync.failed"
                        ]
                      }
                    },
                    "repo_ids": {
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "url",
                    "events",
                    "repo_ids",
                    "created_at",
                    "updated_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `admin`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "in": "path",
            "name": "webhookTargetId",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "updateWebhookTarget",
        "tags": [
          "Webhook Target"
        ],
        "summary": "Update webhook target",
        "description": "Update a webhook target for the organization. Any provided field replaces its current value; omitted fields are left unchanged. Pass `repo_ids: null` to clear the repo filter and make the target org-wide.",
        "responses": {
          "200": {
            "description": "Webhook target updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "url": {
                      "type": "string"
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "repo.created",
                          "repo.updated",
                          "repo.deleted",
                          "bookmark.created",
                          "bookmark.deleted",
                          "bookmark.moved",
                          "bookmark.merged",
                          "change.created",
                          "change.evolved",
                          "push",
                          "sync.queued",
                          "sync.in_progress",
                          "sync.completed",
                          "sync.failed"
                        ]
                      }
                    },
                    "repo_ids": {
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "url",
                    "events",
                    "repo_ids",
                    "created_at",
                    "updated_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `admin`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "in": "path",
            "name": "webhookTargetId",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "events": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "repo.created",
                        "repo.updated",
                        "repo.deleted",
                        "bookmark.created",
                        "bookmark.deleted",
                        "bookmark.moved",
                        "bookmark.merged",
                        "change.created",
                        "change.evolved",
                        "push",
                        "sync.queued",
                        "sync.in_progress",
                        "sync.completed",
                        "sync.failed"
                      ]
                    }
                  },
                  "repo_ids": {
                    "anyOf": [
                      {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteWebhookTarget",
        "tags": [
          "Webhook Target"
        ],
        "summary": "Delete webhook target",
        "description": "Delete a webhook target from the organization",
        "responses": {
          "200": {
            "description": "Webhook target deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `admin`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "in": "path",
            "name": "webhookTargetId",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/{org}/repos": {
      "post": {
        "operationId": "createRepo",
        "tags": [
          "Repo"
        ],
        "summary": "Create repository",
        "description": "Create a new repository in the organization",
        "responses": {
          "201": {
            "description": "Repository created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "org": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "default_bookmark": {
                      "type": "string"
                    },
                    "head_change_id": {
                      "type": "string",
                      "pattern": "^[zyxwvutsrqponmlk]{32}$",
                      "description": "Current change id at the default bookmark tip. On empty repositories this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz)."
                    },
                    "upstream": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri"
                            },
                            "auth_kind": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "token",
                                    "username_password"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Kind of credentials stored for this upstream, or null if it is public. Auth payloads are write-only — secrets are never returned."
                            },
                            "latest_sync": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "repo_id": {
                                      "type": "string"
                                    },
                                    "direction": {
                                      "type": "string",
                                      "enum": [
                                        "pull",
                                        "push"
                                      ]
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "queued",
                                        "in_progress",
                                        "completed",
                                        "failed"
                                      ]
                                    },
                                    "attempt": {
                                      "type": "integer"
                                    },
                                    "ref_globs": {
                                      "type": "object",
                                      "properties": {
                                        "branches": {
                                          "type": "string"
                                        },
                                        "tags": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "branches",
                                        "tags"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "stats": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "refs": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string"
                                                  },
                                                  "before": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "after": {
                                                    "type": "string"
                                                  },
                                                  "outcome": {
                                                    "type": "string",
                                                    "enum": [
                                                      "updated",
                                                      "unchanged",
                                                      "filtered",
                                                      "rejected"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "before",
                                                  "after",
                                                  "outcome"
                                                ]
                                              }
                                            }
                                          },
                                          "required": [
                                            "refs"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "error": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "created_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "started_at": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "finished_at": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "repo_id",
                                    "direction",
                                    "status",
                                    "attempt",
                                    "ref_globs",
                                    "stats",
                                    "error",
                                    "created_at",
                                    "started_at",
                                    "finished_at"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Most recent sync for this upstream, or null if no sync has started yet."
                            }
                          },
                          "required": [
                            "url",
                            "auth_kind",
                            "latest_sync"
                          ],
                          "description": "Upstream git remote configuration. Each repository has at most one upstream."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Upstream remote configured for this repository, or null if none is configured."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "tags": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "org",
                    "name",
                    "default_bookmark",
                    "head_change_id",
                    "upstream",
                    "created_at",
                    "tags"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `write`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "default_bookmark": {
                    "default": "main",
                    "type": "string"
                  },
                  "tags": {
                    "description": "Repository tags. Keys must not start with \"$\" (reserved for tag filter operators).",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "upstream": {
                    "description": "Optional upstream remote to add at create time. Equivalent to creating the repo and then PATCHing it with the same `upstream` value.",
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "format": "uri"
                      },
                      "auth": {
                        "description": "Authentication for the upstream remote. On PATCH: omit to leave any existing credential unchanged, pass `null` to clear and make the upstream public, pass an object to set/replace. On POST, both omit and `null` create a public upstream.",
                        "anyOf": [
                          {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "token"
                                  },
                                  "token": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "token_username": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "kind",
                                  "token"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "username_password"
                                  },
                                  "username": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "password": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "kind",
                                  "username",
                                  "password"
                                ]
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "url"
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listRepos",
        "tags": [
          "Repo"
        ],
        "summary": "List repositories",
        "description": "List repositories in the organization using cursor pagination",
        "responses": {
          "200": {
            "description": "Repository list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Cursor for the next page, or null when no more results remain"
                    },
                    "has_more": {
                      "type": "boolean",
                      "description": "Whether another page of results is available"
                    },
                    "repos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "org": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "default_bookmark": {
                            "type": "string"
                          },
                          "head_change_id": {
                            "type": "string",
                            "pattern": "^[zyxwvutsrqponmlk]{32}$",
                            "description": "Current change id at the default bookmark tip. On empty repositories this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz)."
                          },
                          "upstream": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": "string",
                                    "format": "uri"
                                  },
                                  "auth_kind": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "token",
                                          "username_password"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "Kind of credentials stored for this upstream, or null if it is public. Auth payloads are write-only — secrets are never returned."
                                  },
                                  "latest_sync": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "repo_id": {
                                            "type": "string"
                                          },
                                          "direction": {
                                            "type": "string",
                                            "enum": [
                                              "pull",
                                              "push"
                                            ]
                                          },
                                          "status": {
                                            "type": "string",
                                            "enum": [
                                              "queued",
                                              "in_progress",
                                              "completed",
                                              "failed"
                                            ]
                                          },
                                          "attempt": {
                                            "type": "integer"
                                          },
                                          "ref_globs": {
                                            "type": "object",
                                            "properties": {
                                              "branches": {
                                                "type": "string"
                                              },
                                              "tags": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "branches",
                                              "tags"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "stats": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "refs": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "name": {
                                                          "type": "string"
                                                        },
                                                        "before": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "after": {
                                                          "type": "string"
                                                        },
                                                        "outcome": {
                                                          "type": "string",
                                                          "enum": [
                                                            "updated",
                                                            "unchanged",
                                                            "filtered",
                                                            "rejected"
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "name",
                                                        "before",
                                                        "after",
                                                        "outcome"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "refs"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "error": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "created_at": {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          "started_at": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "finished_at": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "repo_id",
                                          "direction",
                                          "status",
                                          "attempt",
                                          "ref_globs",
                                          "stats",
                                          "error",
                                          "created_at",
                                          "started_at",
                                          "finished_at"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "Most recent sync for this upstream, or null if no sync has started yet."
                                  }
                                },
                                "required": [
                                  "url",
                                  "auth_kind",
                                  "latest_sync"
                                ],
                                "description": "Upstream git remote configuration. Each repository has at most one upstream."
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Upstream remote configured for this repository, or null if none is configured."
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "tags": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "org",
                          "name",
                          "default_bookmark",
                          "head_change_id",
                          "upstream",
                          "created_at",
                          "tags"
                        ]
                      }
                    }
                  },
                  "required": [
                    "next_cursor",
                    "has_more",
                    "repos"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `read`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor from a previous response"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Maximum number of items to return (max 200)"
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "type": "string"
            },
            "description": "Repository tag filter. Prefer a JSON-encoded structured filter object; legacy comma-separated key:value strings are deprecated but still accepted."
          }
        ]
      }
    },
    "/{org}/{repo}/upstream/syncs": {
      "get": {
        "operationId": "listRepoUpstreamSyncs",
        "tags": [
          "Repo"
        ],
        "summary": "List upstream syncs",
        "description": "List syncs for the repository upstream, newest first.",
        "responses": {
          "200": {
            "description": "Sync list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Cursor for the next page, or null when no more results remain"
                    },
                    "has_more": {
                      "type": "boolean",
                      "description": "Whether another page of results is available"
                    },
                    "syncs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "repo_id": {
                            "type": "string"
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "pull",
                              "push"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "queued",
                              "in_progress",
                              "completed",
                              "failed"
                            ]
                          },
                          "attempt": {
                            "type": "integer"
                          },
                          "ref_globs": {
                            "type": "object",
                            "properties": {
                              "branches": {
                                "type": "string"
                              },
                              "tags": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "branches",
                              "tags"
                            ],
                            "additionalProperties": false
                          },
                          "stats": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "refs": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string"
                                        },
                                        "before": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "after": {
                                          "type": "string"
                                        },
                                        "outcome": {
                                          "type": "string",
                                          "enum": [
                                            "updated",
                                            "unchanged",
                                            "filtered",
                                            "rejected"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "before",
                                        "after",
                                        "outcome"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "refs"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "error": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "started_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "finished_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "repo_id",
                          "direction",
                          "status",
                          "attempt",
                          "ref_globs",
                          "stats",
                          "error",
                          "created_at",
                          "started_at",
                          "finished_at"
                        ]
                      }
                    }
                  },
                  "required": [
                    "next_cursor",
                    "has_more",
                    "syncs"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `read`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor from a previous response"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Maximum number of items to return (max 200)"
          }
        ]
      },
      "post": {
        "operationId": "syncUpstream",
        "tags": [
          "Repo"
        ],
        "summary": "Sync upstream",
        "description": "Enqueue a sync for the repository upstream. Returns the sync, which the worker processes asynchronously. Read `repo.upstream.latest_sync`, fetch `GET /:repo/upstream/syncs/:syncId`, or list `GET /:repo/upstream/syncs` for status.",
        "responses": {
          "201": {
            "description": "Sync enqueued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "repo_id": {
                      "type": "string"
                    },
                    "direction": {
                      "type": "string",
                      "enum": [
                        "pull",
                        "push"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "in_progress",
                        "completed",
                        "failed"
                      ]
                    },
                    "attempt": {
                      "type": "integer"
                    },
                    "ref_globs": {
                      "type": "object",
                      "properties": {
                        "branches": {
                          "type": "string"
                        },
                        "tags": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "branches",
                        "tags"
                      ],
                      "additionalProperties": false
                    },
                    "stats": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "refs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "before": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "after": {
                                    "type": "string"
                                  },
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "updated",
                                      "unchanged",
                                      "filtered",
                                      "rejected"
                                    ]
                                  }
                                },
                                "required": [
                                  "name",
                                  "before",
                                  "after",
                                  "outcome"
                                ]
                              }
                            }
                          },
                          "required": [
                            "refs"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "started_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "finished_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "repo_id",
                    "direction",
                    "status",
                    "attempt",
                    "ref_globs",
                    "stats",
                    "error",
                    "created_at",
                    "started_at",
                    "finished_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `write`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "direction": {
                    "type": "string",
                    "enum": [
                      "pull",
                      "push"
                    ],
                    "description": "Direction to sync between the repository and its upstream."
                  },
                  "ref_globs": {
                    "description": "Branch and tag glob filters for this sync. Omit to sync all branches and tags.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "branches": {
                            "type": "string"
                          },
                          "tags": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "branches"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "branches": {
                            "type": "string"
                          },
                          "tags": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "tags"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "required": [
                  "direction"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/{org}/{repo}/upstream/syncs/{syncId}": {
      "get": {
        "operationId": "getRepoUpstreamSync",
        "tags": [
          "Repo"
        ],
        "summary": "Get upstream sync",
        "description": "Get one sync for the repository upstream.",
        "responses": {
          "200": {
            "description": "Sync",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "repo_id": {
                      "type": "string"
                    },
                    "direction": {
                      "type": "string",
                      "enum": [
                        "pull",
                        "push"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "in_progress",
                        "completed",
                        "failed"
                      ]
                    },
                    "attempt": {
                      "type": "integer"
                    },
                    "ref_globs": {
                      "type": "object",
                      "properties": {
                        "branches": {
                          "type": "string"
                        },
                        "tags": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "branches",
                        "tags"
                      ],
                      "additionalProperties": false
                    },
                    "stats": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "refs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "before": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "after": {
                                    "type": "string"
                                  },
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "updated",
                                      "unchanged",
                                      "filtered",
                                      "rejected"
                                    ]
                                  }
                                },
                                "required": [
                                  "name",
                                  "before",
                                  "after",
                                  "outcome"
                                ]
                              }
                            }
                          },
                          "required": [
                            "refs"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "started_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "finished_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "repo_id",
                    "direction",
                    "status",
                    "attempt",
                    "ref_globs",
                    "stats",
                    "error",
                    "created_at",
                    "started_at",
                    "finished_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `read`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          },
          {
            "in": "path",
            "name": "syncId",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Sync id"
          }
        ]
      }
    },
    "/{org}/{repo}": {
      "get": {
        "operationId": "getRepo",
        "tags": [
          "Repo"
        ],
        "summary": "Get repository",
        "description": "Get metadata for a specific repository",
        "responses": {
          "200": {
            "description": "Repository",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "org": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "default_bookmark": {
                      "type": "string"
                    },
                    "head_change_id": {
                      "type": "string",
                      "pattern": "^[zyxwvutsrqponmlk]{32}$",
                      "description": "Current change id at the default bookmark tip. On empty repositories this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz)."
                    },
                    "upstream": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri"
                            },
                            "auth_kind": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "token",
                                    "username_password"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Kind of credentials stored for this upstream, or null if it is public. Auth payloads are write-only — secrets are never returned."
                            },
                            "latest_sync": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "repo_id": {
                                      "type": "string"
                                    },
                                    "direction": {
                                      "type": "string",
                                      "enum": [
                                        "pull",
                                        "push"
                                      ]
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "queued",
                                        "in_progress",
                                        "completed",
                                        "failed"
                                      ]
                                    },
                                    "attempt": {
                                      "type": "integer"
                                    },
                                    "ref_globs": {
                                      "type": "object",
                                      "properties": {
                                        "branches": {
                                          "type": "string"
                                        },
                                        "tags": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "branches",
                                        "tags"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "stats": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "refs": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string"
                                                  },
                                                  "before": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "after": {
                                                    "type": "string"
                                                  },
                                                  "outcome": {
                                                    "type": "string",
                                                    "enum": [
                                                      "updated",
                                                      "unchanged",
                                                      "filtered",
                                                      "rejected"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "before",
                                                  "after",
                                                  "outcome"
                                                ]
                                              }
                                            }
                                          },
                                          "required": [
                                            "refs"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "error": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "created_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "started_at": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "finished_at": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "repo_id",
                                    "direction",
                                    "status",
                                    "attempt",
                                    "ref_globs",
                                    "stats",
                                    "error",
                                    "created_at",
                                    "started_at",
                                    "finished_at"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Most recent sync for this upstream, or null if no sync has started yet."
                            }
                          },
                          "required": [
                            "url",
                            "auth_kind",
                            "latest_sync"
                          ],
                          "description": "Upstream git remote configuration. Each repository has at most one upstream."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Upstream remote configured for this repository, or null if none is configured."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "tags": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "org",
                    "name",
                    "default_bookmark",
                    "head_change_id",
                    "upstream",
                    "created_at",
                    "tags"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `read`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          }
        ]
      },
      "delete": {
        "operationId": "deleteRepo",
        "tags": [
          "Repo"
        ],
        "summary": "Delete repository",
        "description": "Permanently delete a repository and all its data",
        "responses": {
          "200": {
            "description": "Repository deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `write`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          }
        ]
      },
      "patch": {
        "operationId": "updateRepo",
        "tags": [
          "Repo"
        ],
        "summary": "Update repository",
        "description": "Update repository name, default bookmark, or tags. Tags are patched: omitted keys are unchanged, string values add or update a tag, and null values remove a tag.",
        "responses": {
          "200": {
            "description": "Repository updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "org": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "default_bookmark": {
                      "type": "string"
                    },
                    "head_change_id": {
                      "type": "string",
                      "pattern": "^[zyxwvutsrqponmlk]{32}$",
                      "description": "Current change id at the default bookmark tip. On empty repositories this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz)."
                    },
                    "upstream": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri"
                            },
                            "auth_kind": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "token",
                                    "username_password"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Kind of credentials stored for this upstream, or null if it is public. Auth payloads are write-only — secrets are never returned."
                            },
                            "latest_sync": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "repo_id": {
                                      "type": "string"
                                    },
                                    "direction": {
                                      "type": "string",
                                      "enum": [
                                        "pull",
                                        "push"
                                      ]
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "queued",
                                        "in_progress",
                                        "completed",
                                        "failed"
                                      ]
                                    },
                                    "attempt": {
                                      "type": "integer"
                                    },
                                    "ref_globs": {
                                      "type": "object",
                                      "properties": {
                                        "branches": {
                                          "type": "string"
                                        },
                                        "tags": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "branches",
                                        "tags"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "stats": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "refs": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string"
                                                  },
                                                  "before": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "after": {
                                                    "type": "string"
                                                  },
                                                  "outcome": {
                                                    "type": "string",
                                                    "enum": [
                                                      "updated",
                                                      "unchanged",
                                                      "filtered",
                                                      "rejected"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "before",
                                                  "after",
                                                  "outcome"
                                                ]
                                              }
                                            }
                                          },
                                          "required": [
                                            "refs"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "error": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "created_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "started_at": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "finished_at": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "repo_id",
                                    "direction",
                                    "status",
                                    "attempt",
                                    "ref_globs",
                                    "stats",
                                    "error",
                                    "created_at",
                                    "started_at",
                                    "finished_at"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Most recent sync for this upstream, or null if no sync has started yet."
                            }
                          },
                          "required": [
                            "url",
                            "auth_kind",
                            "latest_sync"
                          ],
                          "description": "Upstream git remote configuration. Each repository has at most one upstream."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Upstream remote configured for this repository, or null if none is configured."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "tags": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "org",
                    "name",
                    "default_bookmark",
                    "head_change_id",
                    "upstream",
                    "created_at",
                    "tags"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `write`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "default_bookmark": {
                    "type": "string",
                    "minLength": 1
                  },
                  "tags": {
                    "description": "Tag patch: string values set tags, null removes them. Keys must not start with \"$\" (reserved for tag filter operators).",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "upstream": {
                    "description": "Set, replace, or remove the upstream remote. Pass an object to attach or update. Pass `null` to remove. Omit to leave unchanged.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "auth": {
                            "description": "Authentication for the upstream remote. On PATCH: omit to leave any existing credential unchanged, pass `null` to clear and make the upstream public, pass an object to set/replace. On POST, both omit and `null` create a public upstream.",
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "token"
                                      },
                                      "token": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "token_username": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "token"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "username_password"
                                      },
                                      "username": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "password": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "username",
                                      "password"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "url"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/{org}/repos/tags": {
      "patch": {
        "operationId": "bulkUpdateRepoTags",
        "tags": [
          "Repo"
        ],
        "summary": "Bulk update tags",
        "description": "Bulk set or remove a tag across repositories. This operation is idempotent.",
        "responses": {
          "200": {
            "description": "Updated count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updated": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "updated"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `write`</Note>"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "repo_ids": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "set",
                      "remove"
                    ]
                  },
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Tag key. Keys must not start with \"$\" (reserved for tag filter operators)."
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "repo_ids",
                  "action",
                  "key"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "org",
            "required": true
          }
        ]
      }
    },
    "/{org}/{repo}/content": {
      "get": {
        "operationId": "getContent",
        "tags": [
          "Content"
        ],
        "summary": "Get content",
        "description": "Get file content or directory listing at a path. Use Accept: application/json for the JSON union response, or Accept: application/octet-stream for raw file bytes. Directory + octet-stream requests return 406 Not Acceptable.\n\nFile, symlink, and directory responses include an optional `metadata` field with the path's metadata when any is set; the field is omitted otherwise. Values are plain UTF-8 strings. Directory listings additionally surface per-entry metadata inline on each row in `entries[]` (also UTF-8 strings, omitted when empty). Reads at a historical `change_id` return today's metadata for the resolved path, not the values as of that change (metadata is stored separately from Git history).\n\nDirectory listings can be filtered by metadata predicates: `?metadata[key]=value`, repeatable. Multiple keys are AND-ed (exact-value match). Entries without metadata (or with mismatched values) are dropped from `entries[]`. The filter is ignored when the resolved path is a file or symlink.",
        "responses": {
          "200": {
            "description": "Content response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "file"
                        },
                        "name": {
                          "type": "string"
                        },
                        "path": {
                          "type": "string"
                        },
                        "sha": {
                          "type": "string"
                        },
                        "is_conflicted": {
                          "type": "boolean"
                        },
                        "size": {
                          "type": "number"
                        },
                        "encoding": {
                          "type": "string",
                          "const": "base64"
                        },
                        "content": {
                          "type": "string"
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "100644",
                            "100755"
                          ],
                          "description": "POSIX file mode for a regular file"
                        },
                        "metadata": {
                          "description": "Metadata attached to this path. Values are UTF-8 strings. Always reflects current values; not snapshotted with change_id.",
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "type",
                        "name",
                        "path",
                        "sha",
                        "size",
                        "encoding",
                        "content",
                        "mode"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "symlink"
                        },
                        "name": {
                          "type": "string"
                        },
                        "path": {
                          "type": "string"
                        },
                        "sha": {
                          "type": "string"
                        },
                        "is_conflicted": {
                          "type": "boolean"
                        },
                        "size": {
                          "type": "number"
                        },
                        "encoding": {
                          "type": "string",
                          "const": "base64"
                        },
                        "content": {
                          "type": "string"
                        },
                        "mode": {
                          "type": "string",
                          "const": "120000",
                          "description": "POSIX file mode for a symlink"
                        },
                        "metadata": {
                          "description": "Metadata attached to this path. Values are UTF-8 strings. Always reflects current values; not snapshotted with change_id.",
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "type",
                        "name",
                        "path",
                        "sha",
                        "size",
                        "encoding",
                        "content",
                        "mode"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "dir"
                        },
                        "name": {
                          "type": "string"
                        },
                        "path": {
                          "type": "string"
                        },
                        "sha": {
                          "type": "string"
                        },
                        "child_count": {
                          "type": "integer",
                          "description": "Number of direct children in this directory"
                        },
                        "entries": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "file"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "path": {
                                    "type": "string"
                                  },
                                  "sha": {
                                    "type": "string"
                                  },
                                  "size": {
                                    "type": "number"
                                  },
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "100644",
                                      "100755"
                                    ],
                                    "description": "POSIX file mode for a regular file"
                                  },
                                  "metadata": {
                                    "description": "Metadata attached to this entry. Values are UTF-8 strings. Always reflects current values; not snapshotted with change_id.",
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "additionalProperties": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "required": [
                                  "type",
                                  "name",
                                  "path",
                                  "sha",
                                  "size",
                                  "mode"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "symlink"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "path": {
                                    "type": "string"
                                  },
                                  "sha": {
                                    "type": "string"
                                  },
                                  "size": {
                                    "type": "number"
                                  },
                                  "mode": {
                                    "type": "string",
                                    "const": "120000",
                                    "description": "POSIX file mode for a symlink"
                                  },
                                  "metadata": {
                                    "description": "Metadata attached to this entry. Values are UTF-8 strings. Always reflects current values; not snapshotted with change_id.",
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "additionalProperties": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "required": [
                                  "type",
                                  "name",
                                  "path",
                                  "sha",
                                  "size",
                                  "mode"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "dir"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "path": {
                                    "type": "string"
                                  },
                                  "sha": {
                                    "type": "string"
                                  },
                                  "metadata": {
                                    "description": "Metadata attached to this entry. Values are UTF-8 strings. Always reflects current values; not snapshotted with change_id.",
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "additionalProperties": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "required": [
                                  "type",
                                  "name",
                                  "path",
                                  "sha"
                                ]
                              }
                            ]
                          }
                        },
                        "metadata": {
                          "description": "Metadata attached to this directory itself. Values are UTF-8 strings. Always reflects current values; not snapshotted with change_id. For per-entry metadata of children, see `entries[].metadata`.",
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "type",
                        "name",
                        "path",
                        "sha",
                        "child_count",
                        "entries"
                      ]
                    }
                  ]
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `read`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          },
          {
            "in": "query",
            "name": "change_id",
            "schema": {
              "type": "string",
              "pattern": "^[zyxwvutsrqponmlk]{32}$"
            },
            "description": "Change id to read content from. Defaults to the current change at the default bookmark tip. You may also pass the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz) to read the empty tree."
          },
          {
            "in": "query",
            "name": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "depth",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10
            },
            "description": "Directory traversal depth: 0 for directory metadata only, 1 for direct children, up to 10"
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string"
              }
            },
            "description": "Filter directory `entries[]` to rows whose metadata matches. Pass one param per key as a deepObject: `?metadata[<key>]=<value>`, repeatable. Multiple keys are AND-ed (an entry must match every pair to survive; exact-value match). Ignored when the resolved path is a file or symlink. Example: `?metadata[tag]=archived&metadata[lang]=en`."
          }
        ]
      }
    },
    "/{org}/{repo}/bookmarks": {
      "get": {
        "operationId": "listBookmarks",
        "tags": [
          "Bookmark"
        ],
        "summary": "List bookmarks",
        "description": "List bookmarks in a repository, optionally filtered by a bookmark-name glob",
        "responses": {
          "200": {
            "description": "Bookmark list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Cursor for the next page, or null when no more results remain"
                    },
                    "has_more": {
                      "type": "boolean",
                      "description": "Whether another page of results is available"
                    },
                    "bookmarks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "change_id": {
                            "type": "string",
                            "pattern": "^[zyxwvutsrqponmlk]{32}$",
                            "description": "Change id the bookmark points to. When a bookmark points at the empty tree this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz)."
                          },
                          "is_default": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "name",
                          "change_id",
                          "is_default"
                        ]
                      }
                    }
                  },
                  "required": [
                    "next_cursor",
                    "has_more",
                    "bookmarks"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `read`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor from a previous response"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Maximum number of items to return (max 200)"
          },
          {
            "in": "query",
            "name": "glob",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Glob pattern matched against bookmark names. Supports '*' and '?' wildcards."
          }
        ]
      },
      "post": {
        "operationId": "createBookmark",
        "tags": [
          "Bookmark"
        ],
        "summary": "Create bookmark",
        "description": "Create a new bookmark from an existing change id",
        "responses": {
          "201": {
            "description": "Bookmark created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "change_id": {
                      "type": "string",
                      "pattern": "^[zyxwvutsrqponmlk]{32}$",
                      "description": "Change id the bookmark points to. When a bookmark points at the empty tree this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz)."
                    },
                    "is_default": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "name",
                    "change_id",
                    "is_default"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `write`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "change_id": {
                    "type": "string",
                    "pattern": "^[zyxwvutsrqponmlk]{32}$",
                    "description": "Change id to point the new bookmark at. This may be the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz)."
                  }
                },
                "required": [
                  "name",
                  "change_id"
                ]
              }
            }
          }
        }
      }
    },
    "/{org}/{repo}/bookmarks/{bookmark}": {
      "get": {
        "operationId": "getBookmark",
        "tags": [
          "Bookmark"
        ],
        "summary": "Get bookmark",
        "description": "Get a single bookmark by name",
        "responses": {
          "200": {
            "description": "Bookmark",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "change_id": {
                      "type": "string",
                      "pattern": "^[zyxwvutsrqponmlk]{32}$",
                      "description": "Change id the bookmark points to. When a bookmark points at the empty tree this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz)."
                    },
                    "is_default": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "name",
                    "change_id",
                    "is_default"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `read`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          },
          {
            "in": "path",
            "name": "bookmark",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      },
      "delete": {
        "operationId": "deleteBookmark",
        "tags": [
          "Bookmark"
        ],
        "summary": "Delete bookmark",
        "description": "Delete a bookmark from a repository",
        "responses": {
          "200": {
            "description": "Bookmark deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `write`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          },
          {
            "in": "path",
            "name": "bookmark",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "moveBookmark",
        "tags": [
          "Bookmark"
        ],
        "summary": "Move bookmark",
        "description": "Move an existing bookmark forward to a different change. Backward or sideways moves require allow_backwards.",
        "responses": {
          "200": {
            "description": "Bookmark moved",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "change_id": {
                      "type": "string",
                      "pattern": "^[zyxwvutsrqponmlk]{32}$",
                      "description": "Change id the bookmark points to. When a bookmark points at the empty tree this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz)."
                    },
                    "is_default": {
                      "type": "boolean"
                    },
                    "from_change_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[zyxwvutsrqponmlk]{32}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "change_id",
                    "is_default",
                    "from_change_id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `write`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          },
          {
            "in": "path",
            "name": "bookmark",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "change_id": {
                    "type": "string",
                    "pattern": "^[zyxwvutsrqponmlk]{32}$",
                    "description": "Change to move the bookmark to. This may be the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz)."
                  },
                  "allow_backwards": {
                    "default": false,
                    "description": "Allow moving the bookmark backwards or sideways. Defaults to false.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "change_id"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/{org}/{repo}/bookmarks/merge": {
      "post": {
        "operationId": "mergeBookmark",
        "tags": [
          "Bookmark"
        ],
        "summary": "Merge bookmarks",
        "description": "Merge the source bookmark into the target bookmark. The target bookmark is advanced to the merge result.",
        "responses": {
          "200": {
            "description": "Merge result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "merge_type": {
                      "type": "string",
                      "enum": [
                        "merge_commit",
                        "no_op"
                      ],
                      "description": "The type of merge that was performed. `no_op` when target and source point to the same commit; `merge_commit` otherwise — every divergent merge creates an explicit merge commit (JJ model)."
                    },
                    "is_conflicted": {
                      "type": "boolean"
                    },
                    "commit_oid": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{40}$",
                      "description": "The commit OID the target bookmark now points to"
                    },
                    "change_id": {
                      "type": "string",
                      "pattern": "^[zyxwvutsrqponmlk]{32}$",
                      "description": "The JJ change ID the target bookmark points to after the merge."
                    },
                    "target": {
                      "type": "string",
                      "description": "The target bookmark that was merged into"
                    },
                    "source": {
                      "type": "string",
                      "description": "The source bookmark that was merged from"
                    },
                    "source_deleted": {
                      "type": "boolean",
                      "description": "Whether the source bookmark was deleted after merge"
                    }
                  },
                  "required": [
                    "merge_type",
                    "is_conflicted",
                    "commit_oid",
                    "change_id",
                    "target",
                    "source",
                    "source_deleted"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `write`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "target": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The bookmark being merged into. Usually main. This bookmark is updated to the resulting merge point."
                  },
                  "source": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The bookmark that has changes to merge into target."
                  },
                  "delete_source": {
                    "default": false,
                    "description": "Whether to delete the source bookmark after a successful merge",
                    "type": "boolean"
                  },
                  "allow_conflicted": {
                    "default": false,
                    "description": "When true, a merge that produces textual conflicts is accepted and the target bookmark is moved to a conflicted merge commit. When false (default), the merge is rejected server-side with MERGE_CONFLICT and nothing is persisted.",
                    "type": "boolean"
                  },
                  "message": {
                    "description": "Description for the resulting merge change. Omit to use the generated merge description; empty string is allowed and means no description.",
                    "type": "string"
                  },
                  "resolutions": {
                    "default": [],
                    "description": "Caller-supplied conflict resolutions, applied before conflict detection. Each resolution targets one path — either the full file (`content`) or a set of per-hunk replacements (`hunks`). A resolution set that covers every otherwise-conflicting path lets an initially-rejected merge succeed on retry without setting `allow_conflicted`.",
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "path": {
                              "type": "string",
                              "minLength": 1,
                              "description": "Repository-relative path of the file to resolve."
                            },
                            "content": {
                              "description": "Base64-encoded replacement bytes. Mutually exclusive with `take`. Use this for hand-edited content, or when the resolution is neither side of the conflict verbatim.",
                              "type": "string"
                            },
                            "take": {
                              "description": "Pick one side of the conflict as the resolution without round-tripping its bytes through the client. The server reads the selected side directly. Mutually exclusive with `content`. If the selected side has no content at this path (an add/delete conflict where that side deleted or never added the file), the resolution deletes the path from the merge output.",
                              "type": "string",
                              "enum": [
                                "target",
                                "source"
                              ]
                            },
                            "encoding": {
                              "default": "base64",
                              "description": "Only base64 is supported today.",
                              "type": "string",
                              "const": "base64"
                            }
                          },
                          "required": [
                            "path"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "path": {
                              "type": "string",
                              "minLength": 1,
                              "description": "Repository-relative path of the file whose hunks are being resolved."
                            },
                            "hunks": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "hunk_id": {
                                    "type": "string",
                                    "minLength": 1,
                                    "description": "Must match a `hunk_id` from a prior MERGE_CONFLICT error response for the containing path."
                                  },
                                  "content": {
                                    "description": "Base64-encoded replacement bytes. Mutually exclusive with `take`.",
                                    "type": "string"
                                  },
                                  "take": {
                                    "description": "Pick one side (`target` or `source`) as this hunk's resolution. The server uses the already-materialized side bytes for this specific conflict span. Mutually exclusive with `content`.",
                                    "type": "string",
                                    "enum": [
                                      "target",
                                      "source"
                                    ]
                                  },
                                  "encoding": {
                                    "default": "base64",
                                    "type": "string",
                                    "const": "base64"
                                  }
                                },
                                "required": [
                                  "hunk_id"
                                ]
                              },
                              "description": "Per-hunk replacements. The set must cover every hunk returned for this path in the prior MERGE_CONFLICT error, otherwise the merge re-raises the conflict."
                            }
                          },
                          "required": [
                            "path",
                            "hunks"
                          ]
                        }
                      ],
                      "description": "A single caller-supplied resolution. Whole-file variants carry `content` OR `take` (not both); per-hunk variants carry `hunks`. Whole-file replaces the merged content at `path`. Per-hunk requires all hunks for the path to be resolved."
                    }
                  }
                },
                "required": [
                  "target",
                  "source"
                ]
              }
            }
          }
        }
      }
    },
    "/{org}/{repo}/changes": {
      "get": {
        "operationId": "listChanges",
        "tags": [
          "Change"
        ],
        "summary": "List changes",
        "description": "List current reachable changes for a repository bookmark",
        "responses": {
          "200": {
            "description": "Change list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Cursor for the next page, or null when no more results remain"
                    },
                    "has_more": {
                      "type": "boolean",
                      "description": "Whether another page of results is available"
                    },
                    "changes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[zyxwvutsrqponmlk]{32}$"
                          },
                          "current_commit_oid": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{40}$"
                          },
                          "is_conflicted": {
                            "type": "boolean",
                            "description": "True when the change current commit still contains unresolved conflicts"
                          },
                          "message": {
                            "type": "string",
                            "description": "Current change description. Empty string means the change has no description."
                          },
                          "author": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "email": {
                                "type": "string"
                              },
                              "date": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "name",
                              "email"
                            ]
                          },
                          "committer": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "email": {
                                "type": "string"
                              },
                              "date": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "name",
                              "email"
                            ]
                          },
                          "parents": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Parent change IDs for this change"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "current_commit_oid",
                          "is_conflicted",
                          "message",
                          "author",
                          "committer",
                          "parents",
                          "created_at",
                          "updated_at"
                        ]
                      }
                    }
                  },
                  "required": [
                    "next_cursor",
                    "has_more",
                    "changes"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `write`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor from a previous response"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Maximum number of items to return (max 200)"
          },
          {
            "in": "query",
            "name": "bookmark",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "operationId": "createChange",
        "tags": [
          "Change"
        ],
        "summary": "Create change",
        "description": "Create a new change on top of an existing base change, optionally applying initial file operations. File content must be base64-encoded.",
        "responses": {
          "201": {
            "description": "Change created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^[zyxwvutsrqponmlk]{32}$"
                    },
                    "current_commit_oid": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{40}$"
                    },
                    "is_conflicted": {
                      "type": "boolean",
                      "description": "True when the change current commit still contains unresolved conflicts"
                    },
                    "message": {
                      "type": "string",
                      "description": "Current change description. Empty string means the change has no description."
                    },
                    "author": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string"
                        },
                        "date": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "name",
                        "email"
                      ]
                    },
                    "committer": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string"
                        },
                        "date": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "name",
                        "email"
                      ]
                    },
                    "parents": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Parent change IDs for this change"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "current_commit_oid",
                    "is_conflicted",
                    "message",
                    "author",
                    "committer",
                    "parents",
                    "created_at",
                    "updated_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `write`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "description": "Description for the newly created change. When optional, omit to create the change with no description; empty string is allowed and also means no description.",
                    "type": "string"
                  },
                  "author": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "email": {
                        "type": "string"
                      },
                      "date": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "name",
                      "email"
                    ]
                  },
                  "committer": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "email": {
                        "type": "string"
                      },
                      "date": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "name",
                      "email"
                    ]
                  },
                  "files": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "path": {
                              "type": "string",
                              "minLength": 1
                            },
                            "content": {
                              "type": "string"
                            },
                            "encoding": {
                              "default": "base64",
                              "type": "string",
                              "const": "base64"
                            },
                            "action": {
                              "type": "string",
                              "const": "upsert"
                            },
                            "mode": {
                              "type": "string",
                              "enum": [
                                "100644",
                                "100755"
                              ]
                            }
                          },
                          "required": [
                            "path",
                            "content"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "path": {
                              "type": "string",
                              "minLength": 1
                            },
                            "action": {
                              "type": "string",
                              "const": "delete"
                            }
                          },
                          "required": [
                            "path",
                            "action"
                          ]
                        }
                      ]
                    }
                  },
                  "base_change_id": {
                    "type": "string",
                    "pattern": "^[zyxwvutsrqponmlk]{32}$",
                    "description": "Change to create the new change on top of. Use the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz) to create the first change in an empty repository."
                  }
                },
                "required": [
                  "base_change_id"
                ]
              }
            }
          }
        }
      }
    },
    "/{org}/{repo}/changes/{change_id}": {
      "patch": {
        "operationId": "updateChange",
        "tags": [
          "Change"
        ],
        "summary": "Patch change",
        "description": "Patch an existing change by updating metadata and/or applying file operations, then snapshot the result into a new change-owned commit. File content must be base64-encoded. When the change is conflicted, `files` writes are refused; submit a `resolutions` array instead to incrementally resolve conflicts — when every contested path is resolved the change becomes clean. `files` and `resolutions` are mutually exclusive on a single PATCH. A PATCH on a conflicted change without `resolutions` returns 409 MERGE_CONFLICT with a `details.conflict_paths` array listing the still-conflicted paths.",
        "responses": {
          "200": {
            "description": "Change updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^[zyxwvutsrqponmlk]{32}$"
                    },
                    "current_commit_oid": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{40}$"
                    },
                    "is_conflicted": {
                      "type": "boolean",
                      "description": "True when the change current commit still contains unresolved conflicts"
                    },
                    "message": {
                      "type": "string",
                      "description": "Current change description. Empty string means the change has no description."
                    },
                    "author": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string"
                        },
                        "date": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "name",
                        "email"
                      ]
                    },
                    "committer": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string"
                        },
                        "date": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "name",
                        "email"
                      ]
                    },
                    "parents": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Parent change IDs for this change"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "current_commit_oid",
                    "is_conflicted",
                    "message",
                    "author",
                    "committer",
                    "parents",
                    "created_at",
                    "updated_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `write`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          },
          {
            "in": "path",
            "name": "change_id",
            "schema": {
              "type": "string",
              "pattern": "^[zyxwvutsrqponmlk]{32}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "description": "Replacement change description. Omit to preserve the existing description; pass an empty string to clear it.",
                    "type": "string"
                  },
                  "author": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "email": {
                        "type": "string"
                      },
                      "date": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "name",
                      "email"
                    ]
                  },
                  "committer": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "email": {
                        "type": "string"
                      },
                      "date": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "name",
                      "email"
                    ]
                  },
                  "files": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "path": {
                              "type": "string",
                              "minLength": 1
                            },
                            "content": {
                              "type": "string"
                            },
                            "encoding": {
                              "default": "base64",
                              "type": "string",
                              "const": "base64"
                            },
                            "action": {
                              "type": "string",
                              "const": "upsert"
                            },
                            "mode": {
                              "type": "string",
                              "enum": [
                                "100644",
                                "100755"
                              ]
                            }
                          },
                          "required": [
                            "path",
                            "content"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "path": {
                              "type": "string",
                              "minLength": 1
                            },
                            "action": {
                              "type": "string",
                              "const": "delete"
                            }
                          },
                          "required": [
                            "path",
                            "action"
                          ]
                        }
                      ]
                    }
                  },
                  "base_commit_oid": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{40}$"
                  },
                  "resolutions": {
                    "description": "Conflict resolutions to apply to a conflicted change. When present, the change advances to a new commit: fully resolved paths collapse into the target-term tree and the change becomes clean when no conflicts remain. `files` and `resolutions` are mutually exclusive — a conflicted change must be resolved via `resolutions` before regular file writes land.",
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "path": {
                              "type": "string",
                              "minLength": 1,
                              "description": "Repository-relative path of the file to resolve."
                            },
                            "content": {
                              "description": "Base64-encoded replacement bytes. Mutually exclusive with `take`. Use this for hand-edited content, or when the resolution is neither side of the conflict verbatim.",
                              "type": "string"
                            },
                            "take": {
                              "description": "Pick one side of the conflict as the resolution without round-tripping its bytes through the client. The server reads the selected side directly. Mutually exclusive with `content`. If the selected side has no content at this path (an add/delete conflict where that side deleted or never added the file), the resolution deletes the path from the merge output.",
                              "type": "string",
                              "enum": [
                                "target",
                                "source"
                              ]
                            },
                            "encoding": {
                              "default": "base64",
                              "description": "Only base64 is supported today.",
                              "type": "string",
                              "const": "base64"
                            }
                          },
                          "required": [
                            "path"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "path": {
                              "type": "string",
                              "minLength": 1,
                              "description": "Repository-relative path of the file whose hunks are being resolved."
                            },
                            "hunks": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "hunk_id": {
                                    "type": "string",
                                    "minLength": 1,
                                    "description": "Must match a `hunk_id` from a prior MERGE_CONFLICT error response for the containing path."
                                  },
                                  "content": {
                                    "description": "Base64-encoded replacement bytes. Mutually exclusive with `take`.",
                                    "type": "string"
                                  },
                                  "take": {
                                    "description": "Pick one side (`target` or `source`) as this hunk's resolution. The server uses the already-materialized side bytes for this specific conflict span. Mutually exclusive with `content`.",
                                    "type": "string",
                                    "enum": [
                                      "target",
                                      "source"
                                    ]
                                  },
                                  "encoding": {
                                    "default": "base64",
                                    "type": "string",
                                    "const": "base64"
                                  }
                                },
                                "required": [
                                  "hunk_id"
                                ]
                              },
                              "description": "Per-hunk replacements. The set must cover every hunk returned for this path in the prior MERGE_CONFLICT error, otherwise the merge re-raises the conflict."
                            }
                          },
                          "required": [
                            "path",
                            "hunks"
                          ]
                        }
                      ],
                      "description": "A single caller-supplied resolution. Whole-file variants carry `content` OR `take` (not both); per-hunk variants carry `hunks`. Whole-file replaces the merged content at `path`. Per-hunk requires all hunks for the path to be resolved."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "getChange",
        "tags": [
          "Change"
        ],
        "summary": "Get change",
        "description": "Retrieve a specific change by its JJ change id",
        "responses": {
          "200": {
            "description": "Change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^[zyxwvutsrqponmlk]{32}$"
                    },
                    "current_commit_oid": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{40}$"
                    },
                    "is_conflicted": {
                      "type": "boolean",
                      "description": "True when the change current commit still contains unresolved conflicts"
                    },
                    "message": {
                      "type": "string",
                      "description": "Current change description. Empty string means the change has no description."
                    },
                    "author": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string"
                        },
                        "date": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "name",
                        "email"
                      ]
                    },
                    "committer": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string"
                        },
                        "date": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "name",
                        "email"
                      ]
                    },
                    "parents": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Parent change IDs for this change"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "conflicts": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "current_commit_oid",
                    "is_conflicted",
                    "message",
                    "author",
                    "committer",
                    "parents",
                    "created_at",
                    "updated_at",
                    "files",
                    "conflicts"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `read`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          },
          {
            "in": "path",
            "name": "change_id",
            "schema": {
              "type": "string",
              "pattern": "^[zyxwvutsrqponmlk]{32}$"
            },
            "required": true
          }
        ]
      }
    },
    "/{org}/{repo}/diff": {
      "get": {
        "operationId": "getDiff",
        "tags": [
          "Change"
        ],
        "summary": "Get diff",
        "description": "Retrieve the diff between two change ids. In the JSON response, conflicted paths are excluded from `entries[]` and surface only in `conflicted_entries[]` (with per-side target/base/source content); the two arrays are mutually exclusive. When the client requests `Accept: text/plain`, the response is a full unified patch that includes every changed path, with conflicted paths rendered inline using JJ-style `<<<<<<<` / `>>>>>>>` markers.",
        "responses": {
          "200": {
            "description": "Diff response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "base_change_id": {
                      "type": "string",
                      "pattern": "^[zyxwvutsrqponmlk]{32}$"
                    },
                    "head_change_id": {
                      "type": "string",
                      "pattern": "^[zyxwvutsrqponmlk]{32}$"
                    },
                    "stats": {
                      "type": "object",
                      "properties": {
                        "entries": {
                          "type": "number"
                        },
                        "additions": {
                          "type": "number"
                        },
                        "deletions": {
                          "type": "number"
                        },
                        "changes": {
                          "type": "number"
                        },
                        "conflicted_entries": {
                          "type": "number"
                        },
                        "conflicted_hunks": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "entries",
                        "additions",
                        "deletions",
                        "changes",
                        "conflicted_entries",
                        "conflicted_hunks"
                      ]
                    },
                    "truncated": {
                      "type": "boolean",
                      "description": "True when the response hit the server entry limit and is incomplete"
                    },
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "added",
                              "modified",
                              "deleted",
                              "renamed"
                            ],
                            "description": "How the entry changed between the base and head changes"
                          },
                          "old_path": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "size_bytes": {
                            "description": "Approximate size in bytes of the changed entry content, not the textual diff",
                            "type": "number"
                          },
                          "is_conflicted": {
                            "type": "boolean",
                            "description": "True when either side of the diff for this entry is still conflicted"
                          },
                          "omitted_reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "binary",
                                  "too_large",
                                  "file_limit"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Why textual hunk data is unavailable for this changed entry: binary content, entry too large, or omitted because the diff hit file limits"
                          },
                          "hunks": {
                            "anyOf": [
                              {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "old_start": {
                                      "type": "number"
                                    },
                                    "old_lines": {
                                      "type": "number"
                                    },
                                    "new_start": {
                                      "type": "number"
                                    },
                                    "new_lines": {
                                      "type": "number"
                                    },
                                    "lines": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "context",
                                              "added",
                                              "deleted",
                                              "annotation"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "text"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "old_start",
                                    "old_lines",
                                    "new_start",
                                    "new_lines",
                                    "lines"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Structured textual diff hunks, or null when omitted_reason is set"
                          },
                          "conflict_hunks": {
                            "anyOf": [
                              {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "hunk_id": {
                                      "type": "string"
                                    },
                                    "old_start": {
                                      "type": "number"
                                    },
                                    "old_lines": {
                                      "type": "number"
                                    },
                                    "new_start": {
                                      "type": "number"
                                    },
                                    "new_lines": {
                                      "type": "number"
                                    },
                                    "target": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "content": {
                                              "type": "string",
                                              "description": "Base64-encoded raw bytes for this side of the conflicted hunk"
                                            }
                                          },
                                          "required": [
                                            "content"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "base": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "content": {
                                              "type": "string",
                                              "description": "Base64-encoded raw bytes for this side of the conflicted hunk"
                                            }
                                          },
                                          "required": [
                                            "content"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "source": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "content": {
                                              "type": "string",
                                              "description": "Base64-encoded raw bytes for this side of the conflicted hunk"
                                            }
                                          },
                                          "required": [
                                            "content"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "hunk_id",
                                    "old_start",
                                    "old_lines",
                                    "new_start",
                                    "new_lines",
                                    "target",
                                    "base",
                                    "source"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "path",
                          "status",
                          "old_path",
                          "is_conflicted",
                          "omitted_reason",
                          "hunks",
                          "conflict_hunks"
                        ]
                      },
                      "description": "Changed entries only. Unchanged paths are omitted from this list"
                    },
                    "conflicted_entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "hunks": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "hunk_id": {
                                  "type": "string"
                                },
                                "old_start": {
                                  "type": "number"
                                },
                                "old_lines": {
                                  "type": "number"
                                },
                                "new_start": {
                                  "type": "number"
                                },
                                "new_lines": {
                                  "type": "number"
                                },
                                "target": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "content": {
                                          "type": "string",
                                          "description": "Base64-encoded raw bytes for this side of the conflicted hunk"
                                        }
                                      },
                                      "required": [
                                        "content"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "base": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "content": {
                                          "type": "string",
                                          "description": "Base64-encoded raw bytes for this side of the conflicted hunk"
                                        }
                                      },
                                      "required": [
                                        "content"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "source": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "content": {
                                          "type": "string",
                                          "description": "Base64-encoded raw bytes for this side of the conflicted hunk"
                                        }
                                      },
                                      "required": [
                                        "content"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "hunk_id",
                                "old_start",
                                "old_lines",
                                "new_start",
                                "new_lines",
                                "target",
                                "base",
                                "source"
                              ]
                            },
                            "description": "Per-hunk conflict detail. Empty when omitted_reason is set or the conflict is non-textual (add/delete)."
                          },
                          "size_bytes": {
                            "description": "Approximate size in bytes of the largest side of the conflict. Informational when omitted_reason is set.",
                            "type": "number"
                          },
                          "omitted_reason": {
                            "description": "Why hunks are unavailable for this conflicted entry: binary content or per-side content exceeded the response size budget. When set, fetch file bytes via GET /content against the target or source change to compose a whole-file resolution.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "binary",
                                  "too_large"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "path",
                          "hunks"
                        ]
                      }
                    }
                  },
                  "required": [
                    "base_change_id",
                    "head_change_id",
                    "stats",
                    "truncated",
                    "entries",
                    "conflicted_entries"
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `read`</Note>"
        },
        "parameters": [
          {
            "in": "path",
            "name": "org",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Organization slug"
          },
          {
            "in": "path",
            "name": "repo",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "Repository name"
          },
          {
            "in": "query",
            "name": "base_change_id",
            "schema": {
              "type": "string",
              "pattern": "^[zyxwvutsrqponmlk]{32}$"
            },
            "required": true,
            "description": "Base change id for the diff. Use the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz) to diff from the empty tree."
          },
          {
            "in": "query",
            "name": "head_change_id",
            "schema": {
              "type": "string",
              "pattern": "^[zyxwvutsrqponmlk]{32}$"
            },
            "required": true,
            "description": "Head change id for the diff. Use the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz) to diff against the empty tree."
          },
          {
            "in": "query",
            "name": "conflicts",
            "schema": {
              "default": "include",
              "type": "string",
              "enum": [
                "include",
                "only",
                "exclude"
              ]
            }
          }
        ]
      }
    },
    "/{org}": {
      "get": {
        "operationId": "getOrg",
        "tags": [
          "Org"
        ],
        "summary": "Get organization",
        "description": "Get organization metadata and repository counts",
        "responses": {
          "200": {
            "description": "Organization summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "num_repos": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "created_at",
                    "num_repos"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "trace_id": {
                          "description": "Support correlation id attached to 5xx responses; quote it when reporting an issue",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>**Required scope:** `read`</Note>"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "org",
            "required": true
          }
        ]
      }
    }
  }
}