{
  "openapi": "3.0.0",
  "info": {
    "title": "OpenSink API",
    "description": "API documentation for OpenSink",
    "version": "1.0.0"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key authentication"
      }
    },
    "schemas": {}
  },
  "paths": {
    "/api/v1/sinks": {
      "get": {
        "operationId": "listSinks",
        "summary": "List Sinks",
        "tags": [
          "Sink"
        ],
        "description": "List all sinks in the current workspace\n\nRequired scope: `sinks:read`, `sinks:all`, or `all:all`",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "A sink collects and organizes items from external sources",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Unique identifier"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255,
                            "description": "Sink name"
                          },
                          "description": {
                            "type": "string",
                            "description": "Optional description",
                            "nullable": true
                          },
                          "color": {
                            "type": "string",
                            "enum": [
                              "neutral",
                              "blue",
                              "green",
                              "yellow",
                              "orange",
                              "red",
                              "purple",
                              "pink"
                            ],
                            "description": "Display color"
                          },
                          "is_public": {
                            "type": "boolean",
                            "description": "Whether the sink is publicly accessible"
                          },
                          "public_slug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255,
                            "pattern": "^[a-z0-9-]+$",
                            "description": "Public URL slug",
                            "nullable": true
                          },
                          "secret": {
                            "type": "string",
                            "description": "Secret key for adding items to this sink"
                          },
                          "workspace_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Workspace ID"
                          },
                          "owner_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Owner user ID"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Creation timestamp"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Last update timestamp"
                          }
                        }
                      }
                    },
                    "trail": {
                      "type": "string",
                      "nullable": true,
                      "description": "Pagination trail for next page"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createSink",
        "summary": "Create Sink",
        "tags": [
          "Sink"
        ],
        "description": "Create a new sink\n\nRequired scope: `sinks:write`, `sinks:all`, or `all:all`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Sink name"
                  },
                  "description": {
                    "type": "string",
                    "description": "Optional description",
                    "nullable": true
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "neutral",
                      "blue",
                      "green",
                      "yellow",
                      "orange",
                      "red",
                      "purple",
                      "pink"
                    ],
                    "description": "Display color"
                  },
                  "is_public": {
                    "type": "boolean",
                    "description": "Whether the sink is publicly accessible"
                  },
                  "public_slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "^[a-z0-9-]+$",
                    "description": "Public URL slug",
                    "nullable": true
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A sink collects and organizes items from external sources",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A sink collects and organizes items from external sources",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Sink name"
                    },
                    "description": {
                      "type": "string",
                      "description": "Optional description",
                      "nullable": true
                    },
                    "color": {
                      "type": "string",
                      "enum": [
                        "neutral",
                        "blue",
                        "green",
                        "yellow",
                        "orange",
                        "red",
                        "purple",
                        "pink"
                      ],
                      "description": "Display color"
                    },
                    "is_public": {
                      "type": "boolean",
                      "description": "Whether the sink is publicly accessible"
                    },
                    "public_slug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "pattern": "^[a-z0-9-]+$",
                      "description": "Public URL slug",
                      "nullable": true
                    },
                    "secret": {
                      "type": "string",
                      "description": "Secret key for adding items to this sink"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "owner_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Owner user ID"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "A sink collects and organizes items from external sources",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A sink collects and organizes items from external sources",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Sink name"
                    },
                    "description": {
                      "type": "string",
                      "description": "Optional description",
                      "nullable": true
                    },
                    "color": {
                      "type": "string",
                      "enum": [
                        "neutral",
                        "blue",
                        "green",
                        "yellow",
                        "orange",
                        "red",
                        "purple",
                        "pink"
                      ],
                      "description": "Display color"
                    },
                    "is_public": {
                      "type": "boolean",
                      "description": "Whether the sink is publicly accessible"
                    },
                    "public_slug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "pattern": "^[a-z0-9-]+$",
                      "description": "Public URL slug",
                      "nullable": true
                    },
                    "secret": {
                      "type": "string",
                      "description": "Secret key for adding items to this sink"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "owner_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Owner user ID"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Bad request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sinks/{id}": {
      "get": {
        "operationId": "getSink",
        "summary": "Get Sink",
        "tags": [
          "Sink"
        ],
        "description": "Get a sink by ID\n\nRequired scope: `sinks:read`, `sinks:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Sink ID"
          }
        ],
        "responses": {
          "200": {
            "description": "A sink collects and organizes items from external sources",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A sink collects and organizes items from external sources",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Sink name"
                    },
                    "description": {
                      "type": "string",
                      "description": "Optional description",
                      "nullable": true
                    },
                    "color": {
                      "type": "string",
                      "enum": [
                        "neutral",
                        "blue",
                        "green",
                        "yellow",
                        "orange",
                        "red",
                        "purple",
                        "pink"
                      ],
                      "description": "Display color"
                    },
                    "is_public": {
                      "type": "boolean",
                      "description": "Whether the sink is publicly accessible"
                    },
                    "public_slug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "pattern": "^[a-z0-9-]+$",
                      "description": "Public URL slug",
                      "nullable": true
                    },
                    "secret": {
                      "type": "string",
                      "description": "Secret key for adding items to this sink"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "owner_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Owner user ID"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateSink",
        "summary": "Update Sink",
        "tags": [
          "Sink"
        ],
        "description": "Update a sink\n\nRequired scope: `sinks:write`, `sinks:all`, or `all:all`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Sink name"
                  },
                  "description": {
                    "type": "string",
                    "description": "Optional description",
                    "nullable": true
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "neutral",
                      "blue",
                      "green",
                      "yellow",
                      "orange",
                      "red",
                      "purple",
                      "pink"
                    ],
                    "description": "Display color"
                  },
                  "is_public": {
                    "type": "boolean",
                    "description": "Whether the sink is publicly accessible"
                  },
                  "public_slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "^[a-z0-9-]+$",
                    "description": "Public URL slug",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Sink ID"
          }
        ],
        "responses": {
          "200": {
            "description": "A sink collects and organizes items from external sources",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A sink collects and organizes items from external sources",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Sink name"
                    },
                    "description": {
                      "type": "string",
                      "description": "Optional description",
                      "nullable": true
                    },
                    "color": {
                      "type": "string",
                      "enum": [
                        "neutral",
                        "blue",
                        "green",
                        "yellow",
                        "orange",
                        "red",
                        "purple",
                        "pink"
                      ],
                      "description": "Display color"
                    },
                    "is_public": {
                      "type": "boolean",
                      "description": "Whether the sink is publicly accessible"
                    },
                    "public_slug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "pattern": "^[a-z0-9-]+$",
                      "description": "Public URL slug",
                      "nullable": true
                    },
                    "secret": {
                      "type": "string",
                      "description": "Secret key for adding items to this sink"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "owner_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Owner user ID"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Bad request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteSink",
        "summary": "Delete Sink",
        "tags": [
          "Sink"
        ],
        "description": "Delete a sink\n\nRequired scope: `sinks:write`, `sinks:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Sink ID"
          }
        ],
        "responses": {
          "200": {
            "description": "A sink collects and organizes items from external sources",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A sink collects and organizes items from external sources",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Sink name"
                    },
                    "description": {
                      "type": "string",
                      "description": "Optional description",
                      "nullable": true
                    },
                    "color": {
                      "type": "string",
                      "enum": [
                        "neutral",
                        "blue",
                        "green",
                        "yellow",
                        "orange",
                        "red",
                        "purple",
                        "pink"
                      ],
                      "description": "Display color"
                    },
                    "is_public": {
                      "type": "boolean",
                      "description": "Whether the sink is publicly accessible"
                    },
                    "public_slug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "pattern": "^[a-z0-9-]+$",
                      "description": "Public URL slug",
                      "nullable": true
                    },
                    "secret": {
                      "type": "string",
                      "description": "Secret key for adding items to this sink"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "owner_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Owner user ID"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sinks/{id}/items": {
      "delete": {
        "operationId": "clearSinkItems",
        "summary": "Clear Sink Items",
        "tags": [
          "Sink"
        ],
        "description": "Delete all items in a sink. This action cannot be undone.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "number",
                      "description": "Number of items deleted"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sink-items": {
      "get": {
        "operationId": "listSinkItems",
        "summary": "List Sink Items",
        "tags": [
          "Sink Item"
        ],
        "description": "List or search items. Use q for full-text search, sink_id to filter by sink. Supports trail-based pagination.\n\nRequired scope: `sink_items:read`, `sink_items:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "sink_id",
            "required": false,
            "description": "Filter by sink ID"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "q",
            "required": false,
            "description": "Search query (optional)"
          },
          {
            "schema": {
              "type": "number"
            },
            "in": "query",
            "name": "$limit",
            "required": false,
            "description": "Maximum items to return (default: 50, max: 100)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "$trail",
            "required": false,
            "description": "Pagination trail from previous response"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "An item collected by a sink",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Unique identifier"
                          },
                          "sink_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Parent sink ID"
                          },
                          "workspace_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Workspace ID"
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255,
                            "description": "Item title"
                          },
                          "body": {
                            "type": "string",
                            "description": "Item body/content",
                            "nullable": true
                          },
                          "type": {
                            "type": "string",
                            "maxLength": 255,
                            "description": "Item type",
                            "nullable": true
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2048,
                            "description": "Associated URL",
                            "nullable": true
                          },
                          "fields": {
                            "type": "object",
                            "description": "Custom fields",
                            "nullable": true
                          },
                          "resources": {
                            "type": "array",
                            "description": "Attached resources (e.g. links)",
                            "nullable": true,
                            "items": {
                              "type": "object",
                              "required": [
                                "type",
                                "label",
                                "url"
                              ],
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "link"
                                  ],
                                  "description": "Resource type"
                                },
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Display label"
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Resource URL"
                                }
                              }
                            }
                          },
                          "occurred_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the event occurred",
                            "nullable": true
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Creation timestamp"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Last update timestamp"
                          }
                        }
                      }
                    },
                    "trail": {
                      "type": "string",
                      "nullable": true,
                      "description": "Pagination trail for next page"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createSink Item",
        "summary": "Create Sink Item",
        "tags": [
          "Sink Item"
        ],
        "description": "Create a new sink item.\n\nRequired scope: `sink_items:write`, `sink_items:all`, or `all:all`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sink_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Parent sink ID"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Item title"
                  },
                  "body": {
                    "type": "string",
                    "description": "Item body/content",
                    "nullable": true
                  },
                  "type": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Item type",
                    "nullable": true
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "description": "Associated URL",
                    "nullable": true
                  },
                  "fields": {
                    "type": "object",
                    "description": "Custom fields",
                    "nullable": true
                  },
                  "resources": {
                    "type": "array",
                    "description": "Attached resources (e.g. links)",
                    "nullable": true,
                    "items": {
                      "type": "object",
                      "required": [
                        "type",
                        "label",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "link"
                          ],
                          "description": "Resource type"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Display label"
                        },
                        "url": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Resource URL"
                        }
                      }
                    }
                  },
                  "occurred_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event occurred",
                    "nullable": true
                  }
                },
                "required": [
                  "sink_id",
                  "title"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "An item collected by a sink",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An item collected by a sink",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "sink_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent sink ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Item title"
                    },
                    "body": {
                      "type": "string",
                      "description": "Item body/content",
                      "nullable": true
                    },
                    "type": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Item type",
                      "nullable": true
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 2048,
                      "description": "Associated URL",
                      "nullable": true
                    },
                    "fields": {
                      "type": "object",
                      "description": "Custom fields",
                      "nullable": true
                    },
                    "resources": {
                      "type": "array",
                      "description": "Attached resources (e.g. links)",
                      "nullable": true,
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "label",
                          "url"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "link"
                            ],
                            "description": "Resource type"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "description": "Display label"
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "description": "Resource URL"
                          }
                        }
                      }
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the event occurred",
                      "nullable": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "An item collected by a sink",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An item collected by a sink",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "sink_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent sink ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Item title"
                    },
                    "body": {
                      "type": "string",
                      "description": "Item body/content",
                      "nullable": true
                    },
                    "type": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Item type",
                      "nullable": true
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 2048,
                      "description": "Associated URL",
                      "nullable": true
                    },
                    "fields": {
                      "type": "object",
                      "description": "Custom fields",
                      "nullable": true
                    },
                    "resources": {
                      "type": "array",
                      "description": "Attached resources (e.g. links)",
                      "nullable": true,
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "label",
                          "url"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "link"
                            ],
                            "description": "Resource type"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "description": "Display label"
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "description": "Resource URL"
                          }
                        }
                      }
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the event occurred",
                      "nullable": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Bad request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sink-items/many": {
      "post": {
        "operationId": "createManySinkItems",
        "summary": "Bulk Create Sink Items",
        "tags": [
          "Sink Item"
        ],
        "description": "Create multiple sink items at once. If any item is invalid, no items are created.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "sink_id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "Parent sink ID"
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255,
                          "description": "Item title"
                        },
                        "body": {
                          "type": "string",
                          "description": "Item body/content",
                          "nullable": true
                        },
                        "type": {
                          "type": "string",
                          "maxLength": 255,
                          "description": "Item type",
                          "nullable": true
                        },
                        "url": {
                          "type": "string",
                          "maxLength": 2048,
                          "description": "Associated URL",
                          "nullable": true
                        },
                        "fields": {
                          "type": "object",
                          "description": "Custom fields",
                          "nullable": true
                        },
                        "resources": {
                          "type": "array",
                          "description": "Attached resources (e.g. links)",
                          "nullable": true,
                          "items": {
                            "type": "object",
                            "required": [
                              "type",
                              "label",
                              "url"
                            ],
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "link"
                                ],
                                "description": "Resource type"
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "description": "Display label"
                              },
                              "url": {
                                "type": "string",
                                "minLength": 1,
                                "description": "Resource URL"
                              }
                            }
                          }
                        },
                        "occurred_at": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the event occurred",
                          "nullable": true
                        }
                      },
                      "required": [
                        "sink_id",
                        "title"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "created": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "An item collected by a sink",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Unique identifier"
                          },
                          "sink_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Parent sink ID"
                          },
                          "workspace_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Workspace ID"
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255,
                            "description": "Item title"
                          },
                          "body": {
                            "type": "string",
                            "description": "Item body/content",
                            "nullable": true
                          },
                          "type": {
                            "type": "string",
                            "maxLength": 255,
                            "description": "Item type",
                            "nullable": true
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2048,
                            "description": "Associated URL",
                            "nullable": true
                          },
                          "fields": {
                            "type": "object",
                            "description": "Custom fields",
                            "nullable": true
                          },
                          "resources": {
                            "type": "array",
                            "description": "Attached resources (e.g. links)",
                            "nullable": true,
                            "items": {
                              "type": "object",
                              "required": [
                                "type",
                                "label",
                                "url"
                              ],
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "link"
                                  ],
                                  "description": "Resource type"
                                },
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Display label"
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Resource URL"
                                }
                              }
                            }
                          },
                          "occurred_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the event occurred",
                            "nullable": true
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Creation timestamp"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Last update timestamp"
                          }
                        }
                      }
                    },
                    "failed": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "item": {
                            "type": "object",
                            "properties": {
                              "sink_id": {
                                "type": "string",
                                "format": "uuid",
                                "description": "Parent sink ID"
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255,
                                "description": "Item title"
                              },
                              "body": {
                                "type": "string",
                                "description": "Item body/content",
                                "nullable": true
                              },
                              "type": {
                                "type": "string",
                                "maxLength": 255,
                                "description": "Item type",
                                "nullable": true
                              },
                              "url": {
                                "type": "string",
                                "maxLength": 2048,
                                "description": "Associated URL",
                                "nullable": true
                              },
                              "fields": {
                                "type": "object",
                                "description": "Custom fields",
                                "nullable": true
                              },
                              "resources": {
                                "type": "array",
                                "description": "Attached resources (e.g. links)",
                                "nullable": true,
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "type",
                                    "label",
                                    "url"
                                  ],
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "link"
                                      ],
                                      "description": "Resource type"
                                    },
                                    "label": {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "Display label"
                                    },
                                    "url": {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "Resource URL"
                                    }
                                  }
                                }
                              },
                              "occurred_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the event occurred",
                                "nullable": true
                              }
                            },
                            "required": [
                              "sink_id",
                              "title"
                            ]
                          },
                          "error": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "invalid": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "item": {
                            "type": "object",
                            "properties": {
                              "sink_id": {
                                "type": "string",
                                "format": "uuid",
                                "description": "Parent sink ID"
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255,
                                "description": "Item title"
                              },
                              "body": {
                                "type": "string",
                                "description": "Item body/content",
                                "nullable": true
                              },
                              "type": {
                                "type": "string",
                                "maxLength": 255,
                                "description": "Item type",
                                "nullable": true
                              },
                              "url": {
                                "type": "string",
                                "maxLength": 2048,
                                "description": "Associated URL",
                                "nullable": true
                              },
                              "fields": {
                                "type": "object",
                                "description": "Custom fields",
                                "nullable": true
                              },
                              "resources": {
                                "type": "array",
                                "description": "Attached resources (e.g. links)",
                                "nullable": true,
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "type",
                                    "label",
                                    "url"
                                  ],
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "link"
                                      ],
                                      "description": "Resource type"
                                    },
                                    "label": {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "Display label"
                                    },
                                    "url": {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "Resource URL"
                                    }
                                  }
                                }
                              },
                              "occurred_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the event occurred",
                                "nullable": true
                              }
                            },
                            "required": [
                              "sink_id",
                              "title"
                            ]
                          },
                          "errors": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sink-items/{id}": {
      "get": {
        "operationId": "getSink Item",
        "summary": "Get Sink Item",
        "tags": [
          "Sink Item"
        ],
        "description": "Get a sink item by ID\n\nRequired scope: `sink_items:read`, `sink_items:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Sink Item ID"
          }
        ],
        "responses": {
          "200": {
            "description": "An item collected by a sink",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An item collected by a sink",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "sink_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent sink ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Item title"
                    },
                    "body": {
                      "type": "string",
                      "description": "Item body/content",
                      "nullable": true
                    },
                    "type": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Item type",
                      "nullable": true
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 2048,
                      "description": "Associated URL",
                      "nullable": true
                    },
                    "fields": {
                      "type": "object",
                      "description": "Custom fields",
                      "nullable": true
                    },
                    "resources": {
                      "type": "array",
                      "description": "Attached resources (e.g. links)",
                      "nullable": true,
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "label",
                          "url"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "link"
                            ],
                            "description": "Resource type"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "description": "Display label"
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "description": "Resource URL"
                          }
                        }
                      }
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the event occurred",
                      "nullable": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateSink Item",
        "summary": "Update Sink Item",
        "tags": [
          "Sink Item"
        ],
        "description": "Update a sink item\n\nRequired scope: `sink_items:write`, `sink_items:all`, or `all:all`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Item title"
                  },
                  "body": {
                    "type": "string",
                    "description": "Item body/content",
                    "nullable": true
                  },
                  "type": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Item type",
                    "nullable": true
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "description": "Associated URL",
                    "nullable": true
                  },
                  "fields": {
                    "type": "object",
                    "description": "Custom fields",
                    "nullable": true
                  },
                  "resources": {
                    "type": "array",
                    "description": "Attached resources (e.g. links)",
                    "nullable": true,
                    "items": {
                      "type": "object",
                      "required": [
                        "type",
                        "label",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "link"
                          ],
                          "description": "Resource type"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Display label"
                        },
                        "url": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Resource URL"
                        }
                      }
                    }
                  },
                  "occurred_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the event occurred",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Sink Item ID"
          }
        ],
        "responses": {
          "200": {
            "description": "An item collected by a sink",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An item collected by a sink",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "sink_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent sink ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Item title"
                    },
                    "body": {
                      "type": "string",
                      "description": "Item body/content",
                      "nullable": true
                    },
                    "type": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Item type",
                      "nullable": true
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 2048,
                      "description": "Associated URL",
                      "nullable": true
                    },
                    "fields": {
                      "type": "object",
                      "description": "Custom fields",
                      "nullable": true
                    },
                    "resources": {
                      "type": "array",
                      "description": "Attached resources (e.g. links)",
                      "nullable": true,
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "label",
                          "url"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "link"
                            ],
                            "description": "Resource type"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "description": "Display label"
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "description": "Resource URL"
                          }
                        }
                      }
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the event occurred",
                      "nullable": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Bad request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteSink Item",
        "summary": "Delete Sink Item",
        "tags": [
          "Sink Item"
        ],
        "description": "Delete a sink item\n\nRequired scope: `sink_items:write`, `sink_items:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Sink Item ID"
          }
        ],
        "responses": {
          "200": {
            "description": "An item collected by a sink",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An item collected by a sink",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "sink_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent sink ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Item title"
                    },
                    "body": {
                      "type": "string",
                      "description": "Item body/content",
                      "nullable": true
                    },
                    "type": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Item type",
                      "nullable": true
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 2048,
                      "description": "Associated URL",
                      "nullable": true
                    },
                    "fields": {
                      "type": "object",
                      "description": "Custom fields",
                      "nullable": true
                    },
                    "resources": {
                      "type": "array",
                      "description": "Attached resources (e.g. links)",
                      "nullable": true,
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "label",
                          "url"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "link"
                            ],
                            "description": "Resource type"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "description": "Display label"
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "description": "Resource URL"
                          }
                        }
                      }
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the event occurred",
                      "nullable": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cron-jobs": {
      "get": {
        "operationId": "listCron Jobs",
        "summary": "List Cron Jobs",
        "tags": [
          "Cron Job"
        ],
        "description": "List all cron jobs in the current workspace\n\nRequired scope: `cron_jobs:read`, `cron_jobs:all`, or `all:all`",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "A scheduled job that makes HTTP requests at specified intervals",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Unique identifier"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255,
                            "description": "Job name"
                          },
                          "schedule_interval_minutes": {
                            "type": "integer",
                            "minimum": 1,
                            "description": "Interval in minutes between runs"
                          },
                          "schedule_start_minute": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 59,
                            "description": "Starting minute for the schedule"
                          },
                          "request_url": {
                            "type": "string",
                            "format": "uri",
                            "description": "URL to call"
                          },
                          "request_method": {
                            "type": "string",
                            "enum": [
                              "GET",
                              "POST",
                              "PUT",
                              "DELETE"
                            ],
                            "description": "HTTP method"
                          },
                          "request_headers": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "HTTP headers",
                            "nullable": true
                          },
                          "request_body": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Request body for POST/PUT",
                            "nullable": true
                          },
                          "runs_count": {
                            "type": "integer",
                            "description": "Total number of runs"
                          },
                          "success_run_count": {
                            "type": "integer",
                            "description": "Number of successful runs"
                          },
                          "failure_run_count": {
                            "type": "integer",
                            "description": "Number of failed runs"
                          },
                          "last_run_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Last run timestamp",
                            "nullable": true
                          },
                          "next_run_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Next scheduled run",
                            "nullable": true
                          },
                          "is_enabled": {
                            "type": "boolean",
                            "description": "Whether the job is enabled"
                          },
                          "workspace_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Workspace ID"
                          },
                          "owner_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Owner user ID"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Creation timestamp"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Last update timestamp"
                          }
                        }
                      }
                    },
                    "trail": {
                      "type": "string",
                      "nullable": true,
                      "description": "Pagination trail for next page"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createCron Job",
        "summary": "Create Cron Job",
        "tags": [
          "Cron Job"
        ],
        "description": "Create a new cron job\n\nRequired scope: `cron_jobs:write`, `cron_jobs:all`, or `all:all`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Job name"
                  },
                  "schedule_interval_minutes": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "Interval in minutes between runs"
                  },
                  "schedule_start_minute": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 59,
                    "description": "Starting minute for the schedule"
                  },
                  "request_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "URL to call"
                  },
                  "request_method": {
                    "type": "string",
                    "enum": [
                      "GET",
                      "POST",
                      "PUT",
                      "DELETE"
                    ],
                    "description": "HTTP method"
                  },
                  "request_headers": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "HTTP headers",
                    "nullable": true
                  },
                  "request_body": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Request body for POST/PUT",
                    "nullable": true
                  },
                  "is_enabled": {
                    "type": "boolean",
                    "description": "Whether the job is enabled"
                  }
                },
                "required": [
                  "name",
                  "schedule_interval_minutes",
                  "request_url"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A scheduled job that makes HTTP requests at specified intervals",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A scheduled job that makes HTTP requests at specified intervals",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Job name"
                    },
                    "schedule_interval_minutes": {
                      "type": "integer",
                      "minimum": 1,
                      "description": "Interval in minutes between runs"
                    },
                    "schedule_start_minute": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 59,
                      "description": "Starting minute for the schedule"
                    },
                    "request_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "URL to call"
                    },
                    "request_method": {
                      "type": "string",
                      "enum": [
                        "GET",
                        "POST",
                        "PUT",
                        "DELETE"
                      ],
                      "description": "HTTP method"
                    },
                    "request_headers": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "HTTP headers",
                      "nullable": true
                    },
                    "request_body": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Request body for POST/PUT",
                      "nullable": true
                    },
                    "runs_count": {
                      "type": "integer",
                      "description": "Total number of runs"
                    },
                    "success_run_count": {
                      "type": "integer",
                      "description": "Number of successful runs"
                    },
                    "failure_run_count": {
                      "type": "integer",
                      "description": "Number of failed runs"
                    },
                    "last_run_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last run timestamp",
                      "nullable": true
                    },
                    "next_run_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Next scheduled run",
                      "nullable": true
                    },
                    "is_enabled": {
                      "type": "boolean",
                      "description": "Whether the job is enabled"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "owner_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Owner user ID"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "A scheduled job that makes HTTP requests at specified intervals",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A scheduled job that makes HTTP requests at specified intervals",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Job name"
                    },
                    "schedule_interval_minutes": {
                      "type": "integer",
                      "minimum": 1,
                      "description": "Interval in minutes between runs"
                    },
                    "schedule_start_minute": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 59,
                      "description": "Starting minute for the schedule"
                    },
                    "request_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "URL to call"
                    },
                    "request_method": {
                      "type": "string",
                      "enum": [
                        "GET",
                        "POST",
                        "PUT",
                        "DELETE"
                      ],
                      "description": "HTTP method"
                    },
                    "request_headers": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "HTTP headers",
                      "nullable": true
                    },
                    "request_body": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Request body for POST/PUT",
                      "nullable": true
                    },
                    "runs_count": {
                      "type": "integer",
                      "description": "Total number of runs"
                    },
                    "success_run_count": {
                      "type": "integer",
                      "description": "Number of successful runs"
                    },
                    "failure_run_count": {
                      "type": "integer",
                      "description": "Number of failed runs"
                    },
                    "last_run_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last run timestamp",
                      "nullable": true
                    },
                    "next_run_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Next scheduled run",
                      "nullable": true
                    },
                    "is_enabled": {
                      "type": "boolean",
                      "description": "Whether the job is enabled"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "owner_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Owner user ID"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Bad request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cron-jobs/{id}": {
      "get": {
        "operationId": "getCron Job",
        "summary": "Get Cron Job",
        "tags": [
          "Cron Job"
        ],
        "description": "Get a cron job by ID\n\nRequired scope: `cron_jobs:read`, `cron_jobs:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Cron Job ID"
          }
        ],
        "responses": {
          "200": {
            "description": "A scheduled job that makes HTTP requests at specified intervals",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A scheduled job that makes HTTP requests at specified intervals",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Job name"
                    },
                    "schedule_interval_minutes": {
                      "type": "integer",
                      "minimum": 1,
                      "description": "Interval in minutes between runs"
                    },
                    "schedule_start_minute": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 59,
                      "description": "Starting minute for the schedule"
                    },
                    "request_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "URL to call"
                    },
                    "request_method": {
                      "type": "string",
                      "enum": [
                        "GET",
                        "POST",
                        "PUT",
                        "DELETE"
                      ],
                      "description": "HTTP method"
                    },
                    "request_headers": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "HTTP headers",
                      "nullable": true
                    },
                    "request_body": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Request body for POST/PUT",
                      "nullable": true
                    },
                    "runs_count": {
                      "type": "integer",
                      "description": "Total number of runs"
                    },
                    "success_run_count": {
                      "type": "integer",
                      "description": "Number of successful runs"
                    },
                    "failure_run_count": {
                      "type": "integer",
                      "description": "Number of failed runs"
                    },
                    "last_run_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last run timestamp",
                      "nullable": true
                    },
                    "next_run_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Next scheduled run",
                      "nullable": true
                    },
                    "is_enabled": {
                      "type": "boolean",
                      "description": "Whether the job is enabled"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "owner_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Owner user ID"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateCron Job",
        "summary": "Update Cron Job",
        "tags": [
          "Cron Job"
        ],
        "description": "Update a cron job\n\nRequired scope: `cron_jobs:write`, `cron_jobs:all`, or `all:all`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Job name"
                  },
                  "schedule_interval_minutes": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "Interval in minutes between runs"
                  },
                  "schedule_start_minute": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 59,
                    "description": "Starting minute for the schedule"
                  },
                  "request_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "URL to call"
                  },
                  "request_method": {
                    "type": "string",
                    "enum": [
                      "GET",
                      "POST",
                      "PUT",
                      "DELETE"
                    ],
                    "description": "HTTP method"
                  },
                  "request_headers": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "HTTP headers",
                    "nullable": true
                  },
                  "request_body": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Request body for POST/PUT",
                    "nullable": true
                  },
                  "is_enabled": {
                    "type": "boolean",
                    "description": "Whether the job is enabled"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Cron Job ID"
          }
        ],
        "responses": {
          "200": {
            "description": "A scheduled job that makes HTTP requests at specified intervals",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A scheduled job that makes HTTP requests at specified intervals",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Job name"
                    },
                    "schedule_interval_minutes": {
                      "type": "integer",
                      "minimum": 1,
                      "description": "Interval in minutes between runs"
                    },
                    "schedule_start_minute": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 59,
                      "description": "Starting minute for the schedule"
                    },
                    "request_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "URL to call"
                    },
                    "request_method": {
                      "type": "string",
                      "enum": [
                        "GET",
                        "POST",
                        "PUT",
                        "DELETE"
                      ],
                      "description": "HTTP method"
                    },
                    "request_headers": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "HTTP headers",
                      "nullable": true
                    },
                    "request_body": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Request body for POST/PUT",
                      "nullable": true
                    },
                    "runs_count": {
                      "type": "integer",
                      "description": "Total number of runs"
                    },
                    "success_run_count": {
                      "type": "integer",
                      "description": "Number of successful runs"
                    },
                    "failure_run_count": {
                      "type": "integer",
                      "description": "Number of failed runs"
                    },
                    "last_run_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last run timestamp",
                      "nullable": true
                    },
                    "next_run_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Next scheduled run",
                      "nullable": true
                    },
                    "is_enabled": {
                      "type": "boolean",
                      "description": "Whether the job is enabled"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "owner_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Owner user ID"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Bad request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteCron Job",
        "summary": "Delete Cron Job",
        "tags": [
          "Cron Job"
        ],
        "description": "Delete a cron job\n\nRequired scope: `cron_jobs:write`, `cron_jobs:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Cron Job ID"
          }
        ],
        "responses": {
          "200": {
            "description": "A scheduled job that makes HTTP requests at specified intervals",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A scheduled job that makes HTTP requests at specified intervals",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Job name"
                    },
                    "schedule_interval_minutes": {
                      "type": "integer",
                      "minimum": 1,
                      "description": "Interval in minutes between runs"
                    },
                    "schedule_start_minute": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 59,
                      "description": "Starting minute for the schedule"
                    },
                    "request_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "URL to call"
                    },
                    "request_method": {
                      "type": "string",
                      "enum": [
                        "GET",
                        "POST",
                        "PUT",
                        "DELETE"
                      ],
                      "description": "HTTP method"
                    },
                    "request_headers": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "HTTP headers",
                      "nullable": true
                    },
                    "request_body": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Request body for POST/PUT",
                      "nullable": true
                    },
                    "runs_count": {
                      "type": "integer",
                      "description": "Total number of runs"
                    },
                    "success_run_count": {
                      "type": "integer",
                      "description": "Number of successful runs"
                    },
                    "failure_run_count": {
                      "type": "integer",
                      "description": "Number of failed runs"
                    },
                    "last_run_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last run timestamp",
                      "nullable": true
                    },
                    "next_run_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Next scheduled run",
                      "nullable": true
                    },
                    "is_enabled": {
                      "type": "boolean",
                      "description": "Whether the job is enabled"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "owner_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Owner user ID"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cron-job-runs": {
      "get": {
        "operationId": "listCronJobRuns",
        "summary": "List Cron Job Runs",
        "tags": [
          "Cron Job Run"
        ],
        "description": "List execution history. Use job_id to filter by a specific cron job.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Maximum results (default: 50, max: 100)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Filter by status (SUCCESS, FAILURE, RUNNING, PENDING)"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "job_id",
            "required": false,
            "description": "Filter by cron job ID (optional)"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "A single execution of a cron job",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Unique identifier"
                          },
                          "job_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Parent job ID"
                          },
                          "response_status": {
                            "type": "integer",
                            "description": "HTTP response status code",
                            "nullable": true
                          },
                          "response_headers": {
                            "type": "object",
                            "description": "Response headers",
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "PENDING",
                              "RUNNING",
                              "SUCCESS",
                              "FAILURE"
                            ],
                            "description": "Run status"
                          },
                          "error_message": {
                            "type": "string",
                            "description": "Error message if failed",
                            "nullable": true
                          },
                          "execution_time_ms": {
                            "type": "integer",
                            "description": "Execution time in milliseconds",
                            "nullable": true
                          },
                          "started_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When execution started",
                            "nullable": true
                          },
                          "finished_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When execution finished",
                            "nullable": true
                          },
                          "workspace_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Workspace ID"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Creation timestamp"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Last update timestamp"
                          }
                        }
                      }
                    },
                    "trail": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cron-job-runs/{id}": {
      "get": {
        "operationId": "getCron Job Run",
        "summary": "Get Cron Job Run",
        "tags": [
          "Cron Job Run"
        ],
        "description": "Get details of a specific run\n\nRequired scope: `cron_job_runs:read`, `cron_job_runs:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Cron Job Run ID"
          }
        ],
        "responses": {
          "200": {
            "description": "A single execution of a cron job",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A single execution of a cron job",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent job ID"
                    },
                    "response_status": {
                      "type": "integer",
                      "description": "HTTP response status code",
                      "nullable": true
                    },
                    "response_headers": {
                      "type": "object",
                      "description": "Response headers",
                      "nullable": true
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "PENDING",
                        "RUNNING",
                        "SUCCESS",
                        "FAILURE"
                      ],
                      "description": "Run status"
                    },
                    "error_message": {
                      "type": "string",
                      "description": "Error message if failed",
                      "nullable": true
                    },
                    "execution_time_ms": {
                      "type": "integer",
                      "description": "Execution time in milliseconds",
                      "nullable": true
                    },
                    "started_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When execution started",
                      "nullable": true
                    },
                    "finished_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When execution finished",
                      "nullable": true
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agents": {
      "get": {
        "operationId": "listAgents",
        "summary": "List Agents",
        "tags": [
          "Agent"
        ],
        "description": "List all agents in the workspace\n\nRequired scope: `agents:read`, `agents:all`, or `all:all`",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "An AI agent with configurable settings",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Unique identifier"
                          },
                          "workspace_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Workspace ID"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255,
                            "description": "Agent name"
                          },
                          "description": {
                            "type": "string",
                            "description": "Agent description",
                            "nullable": true
                          },
                          "config_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Current active config ID",
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "running",
                              "waiting_for_input",
                              "completed",
                              "failed"
                            ],
                            "nullable": true,
                            "description": "Agent status based on latest session"
                          },
                          "execution_endpoint": {
                            "type": "object",
                            "nullable": true,
                            "properties": {
                              "url": {
                                "type": "string",
                                "description": "Endpoint URL"
                              },
                              "method": {
                                "type": "string",
                                "enum": [
                                  "POST",
                                  "GET",
                                  "PUT",
                                  "DELETE"
                                ],
                                "description": "HTTP method"
                              },
                              "headers": {
                                "type": "object",
                                "additionalProperties": {
                                  "type": "string"
                                },
                                "description": "Request headers"
                              },
                              "body": {
                                "type": "object",
                                "additionalProperties": true,
                                "description": "Request body"
                              }
                            },
                            "required": [
                              "url",
                              "method"
                            ],
                            "description": "Execution endpoint configuration"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Creation timestamp"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Last update timestamp"
                          }
                        }
                      }
                    },
                    "trail": {
                      "type": "string",
                      "nullable": true,
                      "description": "Pagination trail for next page"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createAgent",
        "summary": "Create Agent",
        "tags": [
          "Agent"
        ],
        "description": "Create a new agent\n\nRequired scope: `agents:write`, `agents:all`, or `all:all`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Agent name"
                  },
                  "description": {
                    "type": "string",
                    "description": "Agent description",
                    "nullable": true
                  },
                  "execution_endpoint": {
                    "type": "object",
                    "nullable": true,
                    "properties": {
                      "url": {
                        "type": "string",
                        "description": "Endpoint URL"
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "POST",
                          "GET",
                          "PUT",
                          "DELETE"
                        ],
                        "description": "HTTP method"
                      },
                      "headers": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        },
                        "description": "Request headers"
                      },
                      "body": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "Request body"
                      }
                    },
                    "required": [
                      "url",
                      "method"
                    ],
                    "description": "Execution endpoint configuration"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "An AI agent with configurable settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An AI agent with configurable settings",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Agent name"
                    },
                    "description": {
                      "type": "string",
                      "description": "Agent description",
                      "nullable": true
                    },
                    "config_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Current active config ID",
                      "nullable": true
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "waiting_for_input",
                        "completed",
                        "failed"
                      ],
                      "nullable": true,
                      "description": "Agent status based on latest session"
                    },
                    "execution_endpoint": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "Endpoint URL"
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "POST",
                            "GET",
                            "PUT",
                            "DELETE"
                          ],
                          "description": "HTTP method"
                        },
                        "headers": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Request headers"
                        },
                        "body": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Request body"
                        }
                      },
                      "required": [
                        "url",
                        "method"
                      ],
                      "description": "Execution endpoint configuration"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "An AI agent with configurable settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An AI agent with configurable settings",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Agent name"
                    },
                    "description": {
                      "type": "string",
                      "description": "Agent description",
                      "nullable": true
                    },
                    "config_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Current active config ID",
                      "nullable": true
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "waiting_for_input",
                        "completed",
                        "failed"
                      ],
                      "nullable": true,
                      "description": "Agent status based on latest session"
                    },
                    "execution_endpoint": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "Endpoint URL"
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "POST",
                            "GET",
                            "PUT",
                            "DELETE"
                          ],
                          "description": "HTTP method"
                        },
                        "headers": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Request headers"
                        },
                        "body": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Request body"
                        }
                      },
                      "required": [
                        "url",
                        "method"
                      ],
                      "description": "Execution endpoint configuration"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Bad request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agents/{id}": {
      "get": {
        "operationId": "getAgent",
        "summary": "Get Agent",
        "tags": [
          "Agent"
        ],
        "description": "Get an agent by ID\n\nRequired scope: `agents:read`, `agents:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Agent ID"
          }
        ],
        "responses": {
          "200": {
            "description": "An AI agent with configurable settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An AI agent with configurable settings",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Agent name"
                    },
                    "description": {
                      "type": "string",
                      "description": "Agent description",
                      "nullable": true
                    },
                    "config_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Current active config ID",
                      "nullable": true
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "waiting_for_input",
                        "completed",
                        "failed"
                      ],
                      "nullable": true,
                      "description": "Agent status based on latest session"
                    },
                    "execution_endpoint": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "Endpoint URL"
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "POST",
                            "GET",
                            "PUT",
                            "DELETE"
                          ],
                          "description": "HTTP method"
                        },
                        "headers": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Request headers"
                        },
                        "body": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Request body"
                        }
                      },
                      "required": [
                        "url",
                        "method"
                      ],
                      "description": "Execution endpoint configuration"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateAgent",
        "summary": "Update Agent",
        "tags": [
          "Agent"
        ],
        "description": "Update an agent\n\nRequired scope: `agents:write`, `agents:all`, or `all:all`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Agent name"
                  },
                  "description": {
                    "type": "string",
                    "description": "Agent description",
                    "nullable": true
                  },
                  "execution_endpoint": {
                    "type": "object",
                    "nullable": true,
                    "properties": {
                      "url": {
                        "type": "string",
                        "description": "Endpoint URL"
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "POST",
                          "GET",
                          "PUT",
                          "DELETE"
                        ],
                        "description": "HTTP method"
                      },
                      "headers": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        },
                        "description": "Request headers"
                      },
                      "body": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "Request body"
                      }
                    },
                    "required": [
                      "url",
                      "method"
                    ],
                    "description": "Execution endpoint configuration"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Agent ID"
          }
        ],
        "responses": {
          "200": {
            "description": "An AI agent with configurable settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An AI agent with configurable settings",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Agent name"
                    },
                    "description": {
                      "type": "string",
                      "description": "Agent description",
                      "nullable": true
                    },
                    "config_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Current active config ID",
                      "nullable": true
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "waiting_for_input",
                        "completed",
                        "failed"
                      ],
                      "nullable": true,
                      "description": "Agent status based on latest session"
                    },
                    "execution_endpoint": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "Endpoint URL"
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "POST",
                            "GET",
                            "PUT",
                            "DELETE"
                          ],
                          "description": "HTTP method"
                        },
                        "headers": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Request headers"
                        },
                        "body": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Request body"
                        }
                      },
                      "required": [
                        "url",
                        "method"
                      ],
                      "description": "Execution endpoint configuration"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Bad request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteAgent",
        "summary": "Delete Agent",
        "tags": [
          "Agent"
        ],
        "description": "Delete an agent\n\nRequired scope: `agents:write`, `agents:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Agent ID"
          }
        ],
        "responses": {
          "200": {
            "description": "An AI agent with configurable settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An AI agent with configurable settings",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Agent name"
                    },
                    "description": {
                      "type": "string",
                      "description": "Agent description",
                      "nullable": true
                    },
                    "config_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Current active config ID",
                      "nullable": true
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "waiting_for_input",
                        "completed",
                        "failed"
                      ],
                      "nullable": true,
                      "description": "Agent status based on latest session"
                    },
                    "execution_endpoint": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "Endpoint URL"
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "POST",
                            "GET",
                            "PUT",
                            "DELETE"
                          ],
                          "description": "HTTP method"
                        },
                        "headers": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Request headers"
                        },
                        "body": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Request body"
                        }
                      },
                      "required": [
                        "url",
                        "method"
                      ],
                      "description": "Execution endpoint configuration"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent-configurations": {
      "get": {
        "operationId": "listAgentConfigurations",
        "summary": "List Agent Configurations",
        "tags": [
          "Agent Config"
        ],
        "description": "List all config versions. Optionally filter by agent_id or variant.\n\nRequired scope: `agent_configs:read`, `agent_configs:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "agent_id",
            "required": false,
            "description": "Filter by agent ID"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "variant",
            "required": false,
            "description": "Filter by variant name"
          },
          {
            "schema": {
              "type": "number"
            },
            "in": "query",
            "name": "$limit",
            "required": false,
            "description": "Maximum items to return (default: 50, max: 100)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "$trail",
            "required": false,
            "description": "Pagination trail from previous response"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "A configuration version for an agent",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Unique identifier"
                          },
                          "agent_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Parent agent ID"
                          },
                          "variant": {
                            "type": "string",
                            "maxLength": 255,
                            "description": "Config variant name"
                          },
                          "version": {
                            "type": "integer",
                            "description": "Global config version number (increments for any change)"
                          },
                          "variant_version": {
                            "type": "integer",
                            "description": "Variant-specific version number (increments per variant)"
                          },
                          "schema_version": {
                            "type": "integer",
                            "description": "Schema version number"
                          },
                          "schema": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "JSON Schema for config values"
                          },
                          "value": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Config values"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Creation timestamp"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Last update timestamp"
                          }
                        }
                      }
                    },
                    "trail": {
                      "type": "string",
                      "nullable": true,
                      "description": "Pagination trail for next page"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createAgentConfiguration",
        "summary": "Create Agent Configuration",
        "tags": [
          "Agent Config"
        ],
        "description": "Create a new configuration version for an agent\n\nRequired scope: `agent_configs:write`, `agent_configs:all`, or `all:all`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agent_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Parent agent ID"
                  },
                  "variant": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Config variant name"
                  },
                  "schema_version": {
                    "type": "integer",
                    "description": "Schema version number"
                  },
                  "schema": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "JSON Schema for config values"
                  },
                  "value": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Config values"
                  }
                },
                "required": [
                  "agent_id",
                  "variant"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A configuration version for an agent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A configuration version for an agent",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "variant": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Config variant name"
                    },
                    "version": {
                      "type": "integer",
                      "description": "Global config version number (increments for any change)"
                    },
                    "variant_version": {
                      "type": "integer",
                      "description": "Variant-specific version number (increments per variant)"
                    },
                    "schema_version": {
                      "type": "integer",
                      "description": "Schema version number"
                    },
                    "schema": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "JSON Schema for config values"
                    },
                    "value": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Config values"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "A configuration version for an agent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A configuration version for an agent",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "variant": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Config variant name"
                    },
                    "version": {
                      "type": "integer",
                      "description": "Global config version number (increments for any change)"
                    },
                    "variant_version": {
                      "type": "integer",
                      "description": "Variant-specific version number (increments per variant)"
                    },
                    "schema_version": {
                      "type": "integer",
                      "description": "Schema version number"
                    },
                    "schema": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "JSON Schema for config values"
                    },
                    "value": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Config values"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Bad request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent-configurations/variants": {
      "get": {
        "operationId": "listAgentConfigurationVariants",
        "summary": "List Agent Configuration Variants",
        "tags": [
          "Agent Config"
        ],
        "description": "List latest config for each variant. Optionally filter by agent_id.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "agent_id",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "A configuration version for an agent",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Unique identifier"
                          },
                          "agent_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Parent agent ID"
                          },
                          "variant": {
                            "type": "string",
                            "maxLength": 255,
                            "description": "Config variant name"
                          },
                          "version": {
                            "type": "integer",
                            "description": "Global config version number (increments for any change)"
                          },
                          "variant_version": {
                            "type": "integer",
                            "description": "Variant-specific version number (increments per variant)"
                          },
                          "schema_version": {
                            "type": "integer",
                            "description": "Schema version number"
                          },
                          "schema": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "JSON Schema for config values"
                          },
                          "value": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Config values"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Creation timestamp"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Last update timestamp"
                          }
                        }
                      }
                    },
                    "trail": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent-configurations/agent/{agentId}": {
      "get": {
        "operationId": "getActiveAgentConfiguration",
        "summary": "Get Active Agent Configuration",
        "tags": [
          "Agent Config"
        ],
        "description": "Get the current active configuration for an agent",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "A configuration version for an agent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A configuration version for an agent",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "variant": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Config variant name"
                    },
                    "version": {
                      "type": "integer",
                      "description": "Global config version number (increments for any change)"
                    },
                    "variant_version": {
                      "type": "integer",
                      "description": "Variant-specific version number (increments per variant)"
                    },
                    "schema_version": {
                      "type": "integer",
                      "description": "Schema version number"
                    },
                    "schema": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "JSON Schema for config values"
                    },
                    "value": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Config values"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent-configurations/{id}": {
      "get": {
        "operationId": "getAgentConfiguration",
        "summary": "Get Agent Configuration",
        "tags": [
          "Agent Config"
        ],
        "description": "Get a specific configuration by ID\n\nRequired scope: `agent_configs:read`, `agent_configs:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Agent Config ID"
          }
        ],
        "responses": {
          "200": {
            "description": "A configuration version for an agent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A configuration version for an agent",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "variant": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Config variant name"
                    },
                    "version": {
                      "type": "integer",
                      "description": "Global config version number (increments for any change)"
                    },
                    "variant_version": {
                      "type": "integer",
                      "description": "Variant-specific version number (increments per variant)"
                    },
                    "schema_version": {
                      "type": "integer",
                      "description": "Schema version number"
                    },
                    "schema": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "JSON Schema for config values"
                    },
                    "value": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Config values"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent-sessions": {
      "get": {
        "operationId": "listAgentSessions",
        "summary": "List Agent Sessions",
        "tags": [
          "Agent Session"
        ],
        "description": "List all sessions. Optionally filter by agent_id or status.\n\nRequired scope: `agent_sessions:read`, `agent_sessions:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "agent_id",
            "required": false,
            "description": "Filter by agent ID"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "running",
                "waiting_for_input",
                "processing_input",
                "completed",
                "failed"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Filter by status"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "running",
                  "waiting_for_input",
                  "processing_input",
                  "completed",
                  "failed"
                ]
              }
            },
            "in": "query",
            "name": "status_in",
            "required": false,
            "description": "Filter by multiple statuses"
          },
          {
            "schema": {
              "type": "number"
            },
            "in": "query",
            "name": "$limit",
            "required": false,
            "description": "Maximum items to return (default: 50, max: 100)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "$trail",
            "required": false,
            "description": "Pagination trail from previous response"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "An agent execution session",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Unique identifier"
                          },
                          "agent_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Parent agent ID"
                          },
                          "workspace_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Workspace ID"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "running",
                              "waiting_for_input",
                              "processing_input",
                              "completed",
                              "failed"
                            ],
                            "description": "Session status"
                          },
                          "state": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Session state data"
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Session metadata"
                          },
                          "error_message": {
                            "type": "string",
                            "nullable": true,
                            "description": "Error message if session failed"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Creation timestamp"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Last update timestamp"
                          }
                        }
                      }
                    },
                    "trail": {
                      "type": "string",
                      "nullable": true,
                      "description": "Pagination trail for next page"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createAgentSession",
        "summary": "Create Agent Session",
        "tags": [
          "Agent Session"
        ],
        "description": "Create a new session for an agent\n\nRequired scope: `agent_sessions:write`, `agent_sessions:all`, or `all:all`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agent_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Parent agent ID"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "running",
                      "waiting_for_input",
                      "processing_input",
                      "completed",
                      "failed"
                    ],
                    "description": "Session status"
                  },
                  "state": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Session state data"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Session metadata"
                  },
                  "error_message": {
                    "type": "string",
                    "nullable": true,
                    "description": "Error message if session failed"
                  }
                },
                "required": [
                  "agent_id"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "An agent execution session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An agent execution session",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "waiting_for_input",
                        "processing_input",
                        "completed",
                        "failed"
                      ],
                      "description": "Session status"
                    },
                    "state": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Session state data"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Session metadata"
                    },
                    "error_message": {
                      "type": "string",
                      "nullable": true,
                      "description": "Error message if session failed"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "An agent execution session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An agent execution session",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "waiting_for_input",
                        "processing_input",
                        "completed",
                        "failed"
                      ],
                      "description": "Session status"
                    },
                    "state": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Session state data"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Session metadata"
                    },
                    "error_message": {
                      "type": "string",
                      "nullable": true,
                      "description": "Error message if session failed"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Bad request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent-sessions/{id}": {
      "get": {
        "operationId": "getAgentSession",
        "summary": "Get Agent Session",
        "tags": [
          "Agent Session"
        ],
        "description": "Get a specific session by ID\n\nRequired scope: `agent_sessions:read`, `agent_sessions:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Agent Session ID"
          }
        ],
        "responses": {
          "200": {
            "description": "An agent execution session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An agent execution session",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "waiting_for_input",
                        "processing_input",
                        "completed",
                        "failed"
                      ],
                      "description": "Session status"
                    },
                    "state": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Session state data"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Session metadata"
                    },
                    "error_message": {
                      "type": "string",
                      "nullable": true,
                      "description": "Error message if session failed"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateAgentSession",
        "summary": "Update Agent Session",
        "tags": [
          "Agent Session"
        ],
        "description": "Update a session\n\nRequired scope: `agent_sessions:write`, `agent_sessions:all`, or `all:all`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "running",
                      "waiting_for_input",
                      "processing_input",
                      "completed",
                      "failed"
                    ],
                    "description": "Session status"
                  },
                  "state": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Session state data"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Session metadata"
                  },
                  "error_message": {
                    "type": "string",
                    "nullable": true,
                    "description": "Error message if session failed"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Agent Session ID"
          }
        ],
        "responses": {
          "200": {
            "description": "An agent execution session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An agent execution session",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "waiting_for_input",
                        "processing_input",
                        "completed",
                        "failed"
                      ],
                      "description": "Session status"
                    },
                    "state": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Session state data"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Session metadata"
                    },
                    "error_message": {
                      "type": "string",
                      "nullable": true,
                      "description": "Error message if session failed"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Bad request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteAgentSession",
        "summary": "Delete Agent Session",
        "tags": [
          "Agent Session"
        ],
        "description": "Delete a session\n\nRequired scope: `agent_sessions:write`, `agent_sessions:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Agent Session ID"
          }
        ],
        "responses": {
          "200": {
            "description": "An agent execution session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An agent execution session",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "waiting_for_input",
                        "processing_input",
                        "completed",
                        "failed"
                      ],
                      "description": "Session status"
                    },
                    "state": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Session state data"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Session metadata"
                    },
                    "error_message": {
                      "type": "string",
                      "nullable": true,
                      "description": "Error message if session failed"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent-session-input-requests": {
      "get": {
        "operationId": "listAgentSessionInputRequests",
        "summary": "List Agent Session Input Requests",
        "tags": [
          "Agent Session Input Request"
        ],
        "description": "List all input requests. Optionally filter by session_id, agent_id, or status.\n\nRequired scope: `agent_session_input_requests:read`, `agent_session_input_requests:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "session_id",
            "required": false,
            "description": "Filter by session ID"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "agent_id",
            "required": false,
            "description": "Filter by agent ID"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "resolved"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Filter by status"
          },
          {
            "schema": {
              "type": "number"
            },
            "in": "query",
            "name": "$limit",
            "required": false,
            "description": "Maximum items to return (default: 50, max: 100)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "$trail",
            "required": false,
            "description": "Pagination trail from previous response"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "An input request from an agent session",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Unique identifier"
                          },
                          "session_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Parent session ID"
                          },
                          "agent_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Parent agent ID"
                          },
                          "workspace_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Workspace ID"
                          },
                          "key": {
                            "type": "string",
                            "maxLength": 255,
                            "description": "Stable identifier for the agent"
                          },
                          "title": {
                            "type": "string",
                            "maxLength": 255,
                            "description": "Short title displayed in the list"
                          },
                          "message": {
                            "type": "string",
                            "description": "Human-readable explanation shown in UI"
                          },
                          "schema": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "JSON Schema describing expected input"
                          },
                          "response": {
                            "type": "object",
                            "additionalProperties": true,
                            "nullable": true,
                            "description": "User-provided response"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "resolved"
                            ],
                            "description": "Request status"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Creation timestamp"
                          },
                          "resolved_at": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "Resolution timestamp"
                          }
                        }
                      }
                    },
                    "trail": {
                      "type": "string",
                      "nullable": true,
                      "description": "Pagination trail for next page"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createAgentSessionInputRequest",
        "summary": "Create Agent Session Input Request",
        "tags": [
          "Agent Session Input Request"
        ],
        "description": "Create a new input request for a session\n\nRequired scope: `agent_session_input_requests:write`, `agent_session_input_requests:all`, or `all:all`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Parent session ID"
                  },
                  "agent_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Parent agent ID"
                  },
                  "key": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Stable identifier for the agent"
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Short title displayed in the list"
                  },
                  "message": {
                    "type": "string",
                    "description": "Human-readable explanation shown in UI"
                  },
                  "schema": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "JSON Schema describing expected input"
                  },
                  "response": {
                    "type": "object",
                    "additionalProperties": true,
                    "nullable": true,
                    "description": "User-provided response"
                  }
                },
                "required": [
                  "session_id",
                  "agent_id",
                  "key",
                  "title",
                  "message",
                  "schema"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "An input request from an agent session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An input request from an agent session",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent session ID"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "key": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Stable identifier for the agent"
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Short title displayed in the list"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable explanation shown in UI"
                    },
                    "schema": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "JSON Schema describing expected input"
                    },
                    "response": {
                      "type": "object",
                      "additionalProperties": true,
                      "nullable": true,
                      "description": "User-provided response"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "resolved"
                      ],
                      "description": "Request status"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "resolved_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "Resolution timestamp"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "An input request from an agent session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An input request from an agent session",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent session ID"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "key": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Stable identifier for the agent"
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Short title displayed in the list"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable explanation shown in UI"
                    },
                    "schema": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "JSON Schema describing expected input"
                    },
                    "response": {
                      "type": "object",
                      "additionalProperties": true,
                      "nullable": true,
                      "description": "User-provided response"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "resolved"
                      ],
                      "description": "Request status"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "resolved_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "Resolution timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Bad request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent-session-input-requests/count": {
      "get": {
        "operationId": "countPendingAgentSessionInputRequests",
        "summary": "Count Pending Input Requests",
        "tags": [
          "Agent Session Input Request"
        ],
        "description": "Get the count of pending input requests",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent-session-input-requests/{id}": {
      "get": {
        "operationId": "getAgentSessionInputRequest",
        "summary": "Get Agent Session Input Request",
        "tags": [
          "Agent Session Input Request"
        ],
        "description": "Get a specific input request by ID\n\nRequired scope: `agent_session_input_requests:read`, `agent_session_input_requests:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Agent Session Input Request ID"
          }
        ],
        "responses": {
          "200": {
            "description": "An input request from an agent session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An input request from an agent session",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent session ID"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "key": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Stable identifier for the agent"
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Short title displayed in the list"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable explanation shown in UI"
                    },
                    "schema": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "JSON Schema describing expected input"
                    },
                    "response": {
                      "type": "object",
                      "additionalProperties": true,
                      "nullable": true,
                      "description": "User-provided response"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "resolved"
                      ],
                      "description": "Request status"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "resolved_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "Resolution timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteAgentSessionInputRequest",
        "summary": "Delete Agent Session Input Request",
        "tags": [
          "Agent Session Input Request"
        ],
        "description": "Delete an input request\n\nRequired scope: `agent_session_input_requests:write`, `agent_session_input_requests:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Agent Session Input Request ID"
          }
        ],
        "responses": {
          "200": {
            "description": "An input request from an agent session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An input request from an agent session",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent session ID"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "key": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Stable identifier for the agent"
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Short title displayed in the list"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable explanation shown in UI"
                    },
                    "schema": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "JSON Schema describing expected input"
                    },
                    "response": {
                      "type": "object",
                      "additionalProperties": true,
                      "nullable": true,
                      "description": "User-provided response"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "resolved"
                      ],
                      "description": "Request status"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "resolved_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "Resolution timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent-session-input-requests/{id}/resolve": {
      "post": {
        "operationId": "resolveAgentSessionInputRequest",
        "summary": "Resolve Agent Session Input Request",
        "tags": [
          "Agent Session Input Request"
        ],
        "description": "Submit a response to resolve an input request",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "response": {
                    "type": "object",
                    "additionalProperties": true
                  }
                },
                "required": [
                  "response"
                ]
              }
            }
          },
          "required": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "An input request from an agent session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An input request from an agent session",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent session ID"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "key": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Stable identifier for the agent"
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Short title displayed in the list"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable explanation shown in UI"
                    },
                    "schema": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "JSON Schema describing expected input"
                    },
                    "response": {
                      "type": "object",
                      "additionalProperties": true,
                      "nullable": true,
                      "description": "User-provided response"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "resolved"
                      ],
                      "description": "Request status"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "resolved_at": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "Resolution timestamp"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent-session-activities": {
      "get": {
        "operationId": "listAgentSessionActivities",
        "summary": "List Agent Session Activities",
        "tags": [
          "Agent Session Activity"
        ],
        "description": "List all activities. Optionally filter by session_id, agent_id, type, or source.\n\nRequired scope: `agent_session_activities:read`, `agent_session_activities:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "session_id",
            "required": false,
            "description": "Filter by session ID"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "agent_id",
            "required": false,
            "description": "Filter by agent ID"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "session_started",
                "session_ended",
                "message",
                "input_request_created",
                "input_request_resolved",
                "sink_item_created",
                "state_updated"
              ]
            },
            "in": "query",
            "name": "type",
            "required": false,
            "description": "Filter by activity type"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "system",
                "agent",
                "user"
              ]
            },
            "in": "query",
            "name": "source",
            "required": false,
            "description": "Filter by source"
          },
          {
            "schema": {
              "type": "number"
            },
            "in": "query",
            "name": "$limit",
            "required": false,
            "description": "Maximum items to return (default: 50, max: 100)"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "$trail",
            "required": false,
            "description": "Pagination trail (activity ID)"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "An activity log entry for an agent session",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Unique identifier"
                          },
                          "session_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Parent session ID"
                          },
                          "agent_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Parent agent ID"
                          },
                          "workspace_id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Workspace ID"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "session_started",
                              "session_ended",
                              "message",
                              "input_request_created",
                              "input_request_resolved",
                              "sink_item_created",
                              "state_updated"
                            ],
                            "description": "Activity type"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "system",
                              "agent",
                              "user"
                            ],
                            "description": "Activity source"
                          },
                          "related_entity_id": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true,
                            "description": "Related entity ID (e.g., input request ID, sink item ID)"
                          },
                          "message": {
                            "type": "string",
                            "nullable": true,
                            "description": "Human-readable message"
                          },
                          "payload": {
                            "type": "object",
                            "additionalProperties": true,
                            "nullable": true,
                            "description": "Additional activity data"
                          },
                          "links": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "text": {
                                  "type": "string",
                                  "description": "Link text"
                                },
                                "href": {
                                  "type": "string",
                                  "format": "uri",
                                  "description": "Link URL"
                                }
                              },
                              "required": [
                                "text",
                                "href"
                              ]
                            },
                            "description": "Associated links"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Creation timestamp"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Last update timestamp"
                          }
                        }
                      }
                    },
                    "trail": {
                      "type": "string",
                      "nullable": true,
                      "description": "Pagination trail for next page"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createAgentSessionActivity",
        "summary": "Create Agent Session Activity",
        "tags": [
          "Agent Session Activity"
        ],
        "description": "Create a new activity for a session\n\nRequired scope: `agent_session_activities:write`, `agent_session_activities:all`, or `all:all`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Parent session ID"
                  },
                  "agent_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Parent agent ID"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "session_started",
                      "session_ended",
                      "message",
                      "input_request_created",
                      "input_request_resolved",
                      "sink_item_created",
                      "state_updated"
                    ],
                    "description": "Activity type"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "system",
                      "agent",
                      "user"
                    ],
                    "description": "Activity source"
                  },
                  "related_entity_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "Related entity ID (e.g., input request ID, sink item ID)"
                  },
                  "message": {
                    "type": "string",
                    "nullable": true,
                    "description": "Human-readable message"
                  },
                  "payload": {
                    "type": "object",
                    "additionalProperties": true,
                    "nullable": true,
                    "description": "Additional activity data"
                  },
                  "links": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "text": {
                          "type": "string",
                          "description": "Link text"
                        },
                        "href": {
                          "type": "string",
                          "format": "uri",
                          "description": "Link URL"
                        }
                      },
                      "required": [
                        "text",
                        "href"
                      ]
                    },
                    "description": "Associated links"
                  }
                },
                "required": [
                  "session_id",
                  "agent_id",
                  "type",
                  "source"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "An activity log entry for an agent session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An activity log entry for an agent session",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent session ID"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "session_started",
                        "session_ended",
                        "message",
                        "input_request_created",
                        "input_request_resolved",
                        "sink_item_created",
                        "state_updated"
                      ],
                      "description": "Activity type"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "system",
                        "agent",
                        "user"
                      ],
                      "description": "Activity source"
                    },
                    "related_entity_id": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true,
                      "description": "Related entity ID (e.g., input request ID, sink item ID)"
                    },
                    "message": {
                      "type": "string",
                      "nullable": true,
                      "description": "Human-readable message"
                    },
                    "payload": {
                      "type": "object",
                      "additionalProperties": true,
                      "nullable": true,
                      "description": "Additional activity data"
                    },
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string",
                            "description": "Link text"
                          },
                          "href": {
                            "type": "string",
                            "format": "uri",
                            "description": "Link URL"
                          }
                        },
                        "required": [
                          "text",
                          "href"
                        ]
                      },
                      "description": "Associated links"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "An activity log entry for an agent session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An activity log entry for an agent session",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent session ID"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "session_started",
                        "session_ended",
                        "message",
                        "input_request_created",
                        "input_request_resolved",
                        "sink_item_created",
                        "state_updated"
                      ],
                      "description": "Activity type"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "system",
                        "agent",
                        "user"
                      ],
                      "description": "Activity source"
                    },
                    "related_entity_id": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true,
                      "description": "Related entity ID (e.g., input request ID, sink item ID)"
                    },
                    "message": {
                      "type": "string",
                      "nullable": true,
                      "description": "Human-readable message"
                    },
                    "payload": {
                      "type": "object",
                      "additionalProperties": true,
                      "nullable": true,
                      "description": "Additional activity data"
                    },
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string",
                            "description": "Link text"
                          },
                          "href": {
                            "type": "string",
                            "format": "uri",
                            "description": "Link URL"
                          }
                        },
                        "required": [
                          "text",
                          "href"
                        ]
                      },
                      "description": "Associated links"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Bad request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent-session-activities/{id}": {
      "get": {
        "operationId": "getAgentSessionActivity",
        "summary": "Get Agent Session Activity",
        "tags": [
          "Agent Session Activity"
        ],
        "description": "Get a specific activity by ID\n\nRequired scope: `agent_session_activities:read`, `agent_session_activities:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Agent Session Activity ID"
          }
        ],
        "responses": {
          "200": {
            "description": "An activity log entry for an agent session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An activity log entry for an agent session",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent session ID"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "session_started",
                        "session_ended",
                        "message",
                        "input_request_created",
                        "input_request_resolved",
                        "sink_item_created",
                        "state_updated"
                      ],
                      "description": "Activity type"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "system",
                        "agent",
                        "user"
                      ],
                      "description": "Activity source"
                    },
                    "related_entity_id": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true,
                      "description": "Related entity ID (e.g., input request ID, sink item ID)"
                    },
                    "message": {
                      "type": "string",
                      "nullable": true,
                      "description": "Human-readable message"
                    },
                    "payload": {
                      "type": "object",
                      "additionalProperties": true,
                      "nullable": true,
                      "description": "Additional activity data"
                    },
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string",
                            "description": "Link text"
                          },
                          "href": {
                            "type": "string",
                            "format": "uri",
                            "description": "Link URL"
                          }
                        },
                        "required": [
                          "text",
                          "href"
                        ]
                      },
                      "description": "Associated links"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteAgentSessionActivity",
        "summary": "Delete Agent Session Activity",
        "tags": [
          "Agent Session Activity"
        ],
        "description": "Delete an activity\n\nRequired scope: `agent_session_activities:write`, `agent_session_activities:all`, or `all:all`",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Agent Session Activity ID"
          }
        ],
        "responses": {
          "200": {
            "description": "An activity log entry for an agent session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An activity log entry for an agent session",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier"
                    },
                    "session_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent session ID"
                    },
                    "agent_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Parent agent ID"
                    },
                    "workspace_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Workspace ID"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "session_started",
                        "session_ended",
                        "message",
                        "input_request_created",
                        "input_request_resolved",
                        "sink_item_created",
                        "state_updated"
                      ],
                      "description": "Activity type"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "system",
                        "agent",
                        "user"
                      ],
                      "description": "Activity source"
                    },
                    "related_entity_id": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true,
                      "description": "Related entity ID (e.g., input request ID, sink item ID)"
                    },
                    "message": {
                      "type": "string",
                      "nullable": true,
                      "description": "Human-readable message"
                    },
                    "payload": {
                      "type": "object",
                      "additionalProperties": true,
                      "nullable": true,
                      "description": "Additional activity data"
                    },
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string",
                            "description": "Link text"
                          },
                          "href": {
                            "type": "string",
                            "format": "uri",
                            "description": "Link URL"
                          }
                        },
                        "required": [
                          "text",
                          "href"
                        ]
                      },
                      "description": "Associated links"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation timestamp"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update timestamp"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.opensink.com",
      "description": "Production Server"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Sink",
      "description": "Sink management endpoints"
    },
    {
      "name": "Sink Item",
      "description": "Sink item endpoints"
    },
    {
      "name": "Cron Job",
      "description": "Cron job scheduling endpoints"
    },
    {
      "name": "Cron Job Run",
      "description": "Cron job execution history"
    },
    {
      "name": "Agent",
      "description": "Agent management endpoints"
    },
    {
      "name": "Agent Config",
      "description": "Agent configuration endpoints"
    },
    {
      "name": "Agent Session",
      "description": "Agent session endpoints"
    },
    {
      "name": "Agent Session Input Request",
      "description": "Agent session input request endpoints"
    },
    {
      "name": "Agent Session Activity",
      "description": "Agent session activity log endpoints"
    }
  ]
}