{
    "openapi": "3.1.0",
    "info": {
        "title": "Cronit API",
        "version": "1.0.0",
        "description": "Cronit calls your URLs on a schedule, keeps every run and e-mails you when a job fails.\n\nAuthenticate with a personal access token (Settings \u2192 API tokens): `Authorization: Bearer <token>`. Tokens are read-only or read + write.\n\nTimes are UTC (ISO 8601). Schedules are 5-field cron expressions evaluated in the job's time zone. Failed runs include an `explanation` (title, detail, hint).\n\nAI agents can use the MCP server at https://cronit.2.28.239.135.sslip.io/mcp instead; see https://cronit.2.28.239.135.sslip.io/llms.txt."
    },
    "servers": [
        {
            "url": "https://cronit.2.28.239.135.sslip.io/api/v1"
        }
    ],
    "security": [
        {
            "bearerAuth": [
                "read"
            ]
        }
    ],
    "paths": {
        "/me": {
            "get": {
                "summary": "Account, plan usage, limits and the current token",
                "responses": {
                    "200": {
                        "description": "The account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Account"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, expired or revoked token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/activity": {
            "get": {
                "summary": "Recent changes and who made them (app, API token, MCP app, Cronit)",
                "parameters": [
                    {
                        "name": "job_id",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 50
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Activity, newest first.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Activity"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, expired or revoked token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/schedule/preview": {
            "post": {
                "summary": "Check a schedule: plain English, next runs, runs per month, fits the plan?",
                "description": "Saves nothing. Use it before creating a job.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ScheduleInput"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The preview.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/SchedulePreview"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Invalid input; \"errors\" says why per field, in words you can act on.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, expired or revoked token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/test-request": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [
                            "write"
                        ]
                    }
                ],
                "summary": "Send a request once, as a job would, without saving anything",
                "description": "Does not count towards the monthly runs. Rate-limited to 10 per minute.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RequestInput"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The result.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/TestResult"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "Missing, expired or revoked token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "The token is read-only.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "203": {
                        "description": "Invalid input; \"errors\" says why per field, in words you can act on.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    },
                    "204": {
                        "description": "Too many requests.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/jobs": {
            "get": {
                "summary": "List jobs",
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "enabled",
                                "disabled",
                                "failing"
                            ]
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Text in the title or URL"
                    },
                    {
                        "name": "folder_id",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 50
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Jobs.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Job"
                                            }
                                        },
                                        "meta": {
                                            "type": "object"
                                        },
                                        "links": {
                                            "type": "object"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, expired or revoked token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [
                            "write"
                        ]
                    }
                ],
                "summary": "Create a job (or validate it with dry_run)",
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 255
                        },
                        "description": "Any unique string. Repeating the request with the same key within 24 h returns the first response (header Idempotent-Replayed: true) instead of doing it twice."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/JobInput"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Created.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Job"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "dry_run: nothing saved; the validated job and its schedule preview.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "dry_run": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Job"
                                        },
                                        "schedule": {
                                            "$ref": "#/components/schemas/SchedulePreview"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Missing, expired or revoked token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "203": {
                        "description": "The token is read-only.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "204": {
                        "description": "Invalid input; \"errors\" says why per field, in words you can act on.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/jobs/{job}": {
            "parameters": [
                {
                    "name": "job",
                    "in": "path",
                    "required": true,
                    "schema": {
                        "type": "integer"
                    },
                    "description": "Job ID"
                }
            ],
            "get": {
                "summary": "Get a job",
                "responses": {
                    "200": {
                        "description": "The job.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Job"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [
                            "write"
                        ]
                    }
                ],
                "summary": "Change a job (only the fields you send; dry_run to preview)",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/JobInput"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The changed job.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Job"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "The token is read-only.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Not found on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "203": {
                        "description": "Invalid input; \"errors\" says why per field, in words you can act on.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [
                            "write"
                        ]
                    }
                ],
                "summary": "Change a job (same as PATCH)",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/JobInput"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The changed job.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Job"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "The token is read-only.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Not found on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "203": {
                        "description": "Invalid input; \"errors\" says why per field, in words you can act on.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [
                            "write"
                        ]
                    }
                ],
                "summary": "Delete a job and its history",
                "responses": {
                    "204": {
                        "description": "Deleted."
                    },
                    "403": {
                        "description": "The token is read-only.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/jobs/{job}/run": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [
                            "write"
                        ]
                    }
                ],
                "summary": "Run a job now",
                "description": "Counts as one monthly run; does not affect failure alerts. Rate-limited to 10 per minute.",
                "parameters": [
                    {
                        "name": "job",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Job ID"
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 255
                        },
                        "description": "Any unique string. Repeating the request with the same key within 24 h returns the first response (header Idempotent-Replayed: true) instead of doing it twice."
                    }
                ],
                "responses": {
                    "201": {
                        "description": "The run.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Execution"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "The token is read-only.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "203": {
                        "description": "Not found on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "204": {
                        "description": "Too many requests.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/jobs/{job}/executions": {
            "get": {
                "summary": "Run history of a job, newest first",
                "parameters": [
                    {
                        "name": "job",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Job ID"
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 50
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Runs, plus the next 3 planned runs.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Execution"
                                            }
                                        },
                                        "predictions": {
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "format": "date-time"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/jobs/{job}/executions/{execution}": {
            "get": {
                "summary": "One run, with response headers and body when the job saves responses",
                "parameters": [
                    {
                        "name": "job",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Job ID"
                    },
                    {
                        "name": "execution",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The run.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ExecutionDetail"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/folders": {
            "get": {
                "summary": "List folders",
                "responses": {
                    "200": {
                        "description": "Folders.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Folder"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [
                            "write"
                        ]
                    }
                ],
                "summary": "Create a folder",
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 255
                        },
                        "description": "Any unique string. Repeating the request with the same key within 24 h returns the first response (header Idempotent-Replayed: true) instead of doing it twice."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 128
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Created.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Folder"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Invalid input; \"errors\" says why per field, in words you can act on.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/folders/{folder}": {
            "parameters": [
                {
                    "name": "folder",
                    "in": "path",
                    "required": true,
                    "schema": {
                        "type": "integer"
                    }
                }
            ],
            "patch": {
                "security": [
                    {
                        "bearerAuth": [
                            "write"
                        ]
                    }
                ],
                "summary": "Rename a folder",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 128
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Renamed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Folder"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Invalid input; \"errors\" says why per field, in words you can act on.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [
                            "write"
                        ]
                    }
                ],
                "summary": "Rename a folder (same as PATCH)",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 128
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Renamed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Folder"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Invalid input; \"errors\" says why per field, in words you can act on.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [
                            "write"
                        ]
                    }
                ],
                "summary": "Delete a folder (its jobs stay, without folder)",
                "responses": {
                    "204": {
                        "description": "Deleted."
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "Personal access token. \"read\" tokens can only use GET and /schedule/preview; \"write\" tokens can do everything."
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "message": {
                        "type": "string"
                    }
                }
            },
            "ValidationError": {
                "type": "object",
                "properties": {
                    "message": {
                        "type": "string"
                    },
                    "errors": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "Explanation": {
                "type": [
                    "object",
                    "null"
                ],
                "description": "Why a run failed and what to do; null for successful runs.",
                "properties": {
                    "code": {
                        "type": "string",
                        "examples": [
                            "http_401",
                            "timeout",
                            "dns_error"
                        ]
                    },
                    "title": {
                        "type": "string"
                    },
                    "detail": {
                        "type": "string"
                    },
                    "hint": {
                        "type": "string"
                    }
                }
            },
            "Usage": {
                "type": "object",
                "properties": {
                    "plan": {
                        "type": "string"
                    },
                    "quota": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "used": {
                        "type": "integer"
                    },
                    "remaining": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "needed_per_month": {
                        "type": "integer",
                        "description": "Runs a month the switched-on jobs need"
                    },
                    "projected_this_month": {
                        "type": "integer"
                    },
                    "runs_out_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "resets_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "state": {
                        "type": "string",
                        "enum": [
                            "ok",
                            "tight",
                            "will_run_out",
                            "reached",
                            "unlimited"
                        ]
                    },
                    "summary": {
                        "type": "string"
                    }
                }
            },
            "Account": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "timezone": {
                        "type": "string"
                    },
                    "plan": {
                        "type": "string"
                    },
                    "usage": {
                        "$ref": "#/components/schemas/Usage"
                    },
                    "limits": {
                        "type": "object",
                        "properties": {
                            "max_jobs": {
                                "type": "integer"
                            },
                            "max_timeout_seconds": {
                                "type": "integer"
                            },
                            "auto_disable_after_failures": {
                                "type": "integer"
                            },
                            "history_days": {
                                "type": "integer"
                            }
                        }
                    },
                    "token": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "access": {
                                "type": "string",
                                "enum": [
                                    "read",
                                    "write"
                                ]
                            },
                            "expires_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        }
                    }
                }
            },
            "ScheduleInput": {
                "type": "object",
                "properties": {
                    "schedule_type": {
                        "type": "string",
                        "enum": [
                            "cron",
                            "once"
                        ],
                        "default": "cron"
                    },
                    "cron_expression": {
                        "type": "string",
                        "description": "5 fields: minute hour day-of-month month day-of-week, e.g. \"0 9 * * 1\". @hourly, @daily, @weekly, @monthly, @yearly are accepted."
                    },
                    "timezone": {
                        "type": "string",
                        "description": "IANA name, e.g. \"Europe/Berlin\". Defaults to the account time zone."
                    },
                    "run_at": {
                        "type": "string",
                        "description": "schedule_type \"once\": local date and time in the job time zone, e.g. \"2026-12-01 09:00\"."
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "No runs after this local date and time."
                    }
                }
            },
            "SchedulePreview": {
                "type": "object",
                "properties": {
                    "description": {
                        "type": "string",
                        "examples": [
                            "Every Monday at 9:00am (Europe/Berlin)"
                        ]
                    },
                    "next_runs": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time"
                                },
                                "local": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "runs_per_month": {
                        "type": "number"
                    },
                    "runs_per_month_text": {
                        "type": "string"
                    },
                    "usage": {
                        "type": "object"
                    },
                    "fits_plan": {
                        "type": "boolean"
                    },
                    "warnings": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "RequestInput": {
                "type": "object",
                "required": [
                    "url"
                ],
                "properties": {
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "Public http(s) URL. Private and internal addresses are refused."
                    },
                    "method": {
                        "type": "string",
                        "enum": [
                            "GET",
                            "POST",
                            "PUT",
                            "PATCH",
                            "DELETE",
                            "HEAD",
                            "OPTIONS"
                        ],
                        "default": "GET"
                    },
                    "headers": {
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "required": [
                                        "name"
                                    ],
                                    "properties": {
                                        "name": {
                                            "type": "string"
                                        },
                                        "value": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            {
                                "type": "object",
                                "additionalProperties": {
                                    "type": "string"
                                },
                                "description": "{\"Name\": \"value\"}"
                            }
                        ]
                    },
                    "body": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "auth_user": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "auth_password": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Write-only. Leave out (or empty) to keep the stored password."
                    },
                    "timeout": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 30,
                        "default": 30
                    },
                    "redirect_success": {
                        "type": "boolean",
                        "default": false,
                        "description": "Count 3xx as success (redirects are not followed)."
                    }
                }
            },
            "TestResult": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "ok",
                            "http_error",
                            "timeout",
                            "dns_error",
                            "connection_error",
                            "ssl_error",
                            "too_large",
                            "blocked_url",
                            "failed",
                            "quota_exceeded"
                        ]
                    },
                    "http_status": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "error": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "duration_ms": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "timings": {
                        "type": [
                            "object",
                            "null"
                        ]
                    },
                    "explanation": {
                        "$ref": "#/components/schemas/Explanation"
                    },
                    "response": {
                        "type": "object",
                        "properties": {
                            "size": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "headers": {
                                "type": [
                                    "object",
                                    "null"
                                ]
                            },
                            "body": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "body_truncated": {
                                "type": "boolean"
                            }
                        }
                    }
                }
            },
            "JobInput": {
                "type": "object",
                "required": [
                    "title",
                    "url"
                ],
                "properties": {
                    "title": {
                        "type": "string",
                        "maxLength": 120
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "folder_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "enabled": {
                        "type": "boolean",
                        "default": true
                    },
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "Public http(s) URL. Private and internal addresses are refused."
                    },
                    "method": {
                        "type": "string",
                        "enum": [
                            "GET",
                            "POST",
                            "PUT",
                            "PATCH",
                            "DELETE",
                            "HEAD",
                            "OPTIONS"
                        ],
                        "default": "GET"
                    },
                    "headers": {
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "required": [
                                        "name"
                                    ],
                                    "properties": {
                                        "name": {
                                            "type": "string"
                                        },
                                        "value": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            {
                                "type": "object",
                                "additionalProperties": {
                                    "type": "string"
                                },
                                "description": "{\"Name\": \"value\"}"
                            }
                        ]
                    },
                    "body": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "auth_user": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "auth_password": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Write-only. Leave out (or empty) to keep the stored password."
                    },
                    "timeout": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 30,
                        "default": 30
                    },
                    "redirect_success": {
                        "type": "boolean",
                        "default": false,
                        "description": "Count 3xx as success (redirects are not followed)."
                    },
                    "save_responses": {
                        "type": "boolean",
                        "default": false
                    },
                    "schedule_type": {
                        "type": "string",
                        "enum": [
                            "cron",
                            "once"
                        ],
                        "default": "cron"
                    },
                    "cron_expression": {
                        "type": "string",
                        "description": "5 fields: minute hour day-of-month month day-of-week, e.g. \"0 9 * * 1\". @hourly, @daily, @weekly, @monthly, @yearly are accepted."
                    },
                    "timezone": {
                        "type": "string",
                        "description": "IANA name, e.g. \"Europe/Berlin\". Defaults to the account time zone."
                    },
                    "run_at": {
                        "type": "string",
                        "description": "schedule_type \"once\": local date and time in the job time zone, e.g. \"2026-12-01 09:00\"."
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "No runs after this local date and time."
                    },
                    "notify_on_failure": {
                        "type": "boolean",
                        "default": true
                    },
                    "notify_failure_threshold": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 25,
                        "default": 1
                    },
                    "notify_on_recovery": {
                        "type": "boolean",
                        "default": true
                    },
                    "notify_on_disable": {
                        "type": "boolean",
                        "default": true
                    },
                    "dry_run": {
                        "type": "boolean",
                        "description": "Validate and preview only; nothing is saved."
                    }
                }
            },
            "Job": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "title": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "enabled": {
                        "type": "boolean"
                    },
                    "folder_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "url": {
                        "type": "string"
                    },
                    "method": {
                        "type": "string",
                        "enum": [
                            "GET",
                            "POST",
                            "PUT",
                            "PATCH",
                            "DELETE",
                            "HEAD",
                            "OPTIONS"
                        ],
                        "default": "GET"
                    },
                    "headers": {
                        "type": "array"
                    },
                    "body": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "auth_user": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "has_auth_password": {
                        "type": "boolean"
                    },
                    "timeout": {
                        "type": "integer"
                    },
                    "redirect_success": {
                        "type": "boolean"
                    },
                    "save_responses": {
                        "type": "boolean"
                    },
                    "schedule_type": {
                        "type": "string"
                    },
                    "cron_expression": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "timezone": {
                        "type": "string"
                    },
                    "run_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "schedule_description": {
                        "type": "string",
                        "examples": [
                            "Every day at 7:00am (UTC)"
                        ]
                    },
                    "runs_per_month": {
                        "type": "number"
                    },
                    "next_run_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "last_run_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "last_status": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_http_status": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "last_duration_ms": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "last_error": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_explanation": {
                        "$ref": "#/components/schemas/Explanation"
                    },
                    "consecutive_failures": {
                        "type": "integer"
                    },
                    "disabled_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "notify_on_failure": {
                        "type": "boolean"
                    },
                    "notify_failure_threshold": {
                        "type": "integer"
                    },
                    "notify_on_recovery": {
                        "type": "boolean"
                    },
                    "notify_on_disable": {
                        "type": "boolean"
                    },
                    "badge_url": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "Execution": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "job_id": {
                        "type": "integer"
                    },
                    "trigger": {
                        "type": "string",
                        "enum": [
                            "scheduled",
                            "manual",
                            "api"
                        ]
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "ok",
                            "http_error",
                            "timeout",
                            "dns_error",
                            "connection_error",
                            "ssl_error",
                            "too_large",
                            "blocked_url",
                            "failed",
                            "quota_exceeded"
                        ]
                    },
                    "status_label": {
                        "type": "string"
                    },
                    "http_status": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "error": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "method": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "scheduled_for": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "started_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "duration_ms": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "jitter_ms": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "timings": {
                        "type": [
                            "object",
                            "null"
                        ]
                    },
                    "response_size": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "explanation": {
                        "$ref": "#/components/schemas/Explanation"
                    }
                }
            },
            "ExecutionDetail": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/Execution"
                    },
                    {
                        "type": "object",
                        "properties": {
                            "response_headers": {
                                "type": [
                                    "object",
                                    "null"
                                ]
                            },
                            "response_body": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    }
                ]
            },
            "Folder": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "jobs_count": {
                        "type": "integer"
                    }
                }
            },
            "Activity": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "job_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "job_title": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "action": {
                        "type": "string"
                    },
                    "source": {
                        "type": "string",
                        "enum": [
                            "web",
                            "api",
                            "mcp",
                            "system"
                        ]
                    },
                    "actor": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "actor_label": {
                        "type": "string"
                    },
                    "summary": {
                        "type": "string"
                    },
                    "changes": {
                        "type": [
                            "object",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            }
        }
    }
}