{
    "openapi": "3.1.2",
    "info": {
        "title": "Notebooker API",
        "version": "1.0.0",
        "description": "The Notebooker API. Authenticate with a personal API key (created in [Settings](https://app.notebooker.ai) \u2014 it starts with `nbk_`) or an OAuth access token, sent as a Bearer token. AI clients can skip keys entirely and use the MCP connector at `https://app.notebooker.ai/mcp`."
    },
    "servers": [
        {
            "url": "https://app.notebooker.ai",
            "description": "Production"
        }
    ],
    "tags": [
        {
            "name": "Webhooks"
        },
        {
            "name": "Account"
        },
        {
            "name": "Notebooks"
        },
        {
            "name": "Sources"
        },
        {
            "name": "Notes"
        },
        {
            "name": "Search"
        },
        {
            "name": "Podcasts"
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "/api/v1/me": {
            "get": {
                "operationId": "account.me",
                "description": "Returns the account behind the presented credential \u2014 handy for\nverifying that a key or token works.",
                "summary": "Who am I",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "name": {
                                            "type": "string"
                                        },
                                        "email": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "name",
                                        "email"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/account": {
            "get": {
                "operationId": "account.show",
                "description": "The current billing period's AI credit: how much is allocated, how much\nremains, and when the period rolls over. `exhausted` mirrors whether\nAI-spend endpoints would currently be blocked.",
                "summary": "Plan & credit usage",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "exhausted": {
                                            "type": "boolean"
                                        },
                                        "reason": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "remaining_usd": {
                                            "type": [
                                                "number",
                                                "null"
                                            ]
                                        },
                                        "allocated_usd": {
                                            "type": [
                                                "number",
                                                "null"
                                            ]
                                        },
                                        "plan_key": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "period_started_at": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "period_ends_at": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "exhausted",
                                        "reason",
                                        "remaining_usd",
                                        "allocated_usd",
                                        "plan_key",
                                        "period_started_at",
                                        "period_ends_at"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/notebooks": {
            "get": {
                "operationId": "notebook.index",
                "description": "All notebooks on the account, with source counts.",
                "summary": "List notebooks",
                "tags": [
                    "Notebooks"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "description": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "sources_count": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "description",
                                                    "sources_count"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/notebooks/{notebookId}/export/markdown": {
            "get": {
                "operationId": "notebook.exportMarkdown",
                "description": "Downloads a zip containing one Markdown file per note, named from the\nnote titles \u2014 ready to drop into Obsidian, Logseq, or any Markdown\neditor.",
                "summary": "Export a notebook as Markdown",
                "tags": [
                    "Notebooks"
                ],
                "parameters": [
                    {
                        "name": "notebookId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "text/html": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        },
                        "headers": {
                            "Transfer-Encoding": {
                                "required": true,
                                "schema": {
                                    "type": "string",
                                    "enum": [
                                        "chunked"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/notes": {
            "get": {
                "operationId": "note.index",
                "description": "Notes on the account, optionally filtered to one notebook.",
                "summary": "List notes",
                "tags": [
                    "Notes"
                ],
                "parameters": [
                    {
                        "name": "notebook_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {}
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "post": {
                "operationId": "note.store",
                "description": "Adds a Markdown note, optionally attached to a notebook.",
                "summary": "Create a note",
                "tags": [
                    "Notes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string"
                                    },
                                    "title": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    },
                                    "notebook_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/api/v1/notes/{noteId}": {
            "get": {
                "operationId": "note.show",
                "summary": "Get a note",
                "tags": [
                    "Notes"
                ],
                "parameters": [
                    {
                        "name": "noteId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {}
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "note.update",
                "description": "Change a note's title and/or content.",
                "summary": "Update a note",
                "tags": [
                    "Notes"
                ],
                "parameters": [
                    {
                        "name": "noteId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    },
                                    "content": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "note.destroy",
                "summary": "Delete a note",
                "tags": [
                    "Notes"
                ],
                "parameters": [
                    {
                        "name": "noteId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/notes/{noteId}/download": {
            "get": {
                "operationId": "note.download",
                "description": "The filename carries the note's title; the body is the note exactly as\nwritten.",
                "summary": "Download a note as Markdown",
                "tags": [
                    "Notes"
                ],
                "parameters": [
                    {
                        "name": "noteId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "text/html": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        },
                        "headers": {
                            "Transfer-Encoding": {
                                "required": true,
                                "schema": {
                                    "type": "string",
                                    "enum": [
                                        "chunked"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/podcasts": {
            "get": {
                "operationId": "podcast.index",
                "summary": "List user's podcasts from Open Notebook",
                "tags": [
                    "Podcasts"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0
                                                },
                                                "error": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "error"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {}
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "podcast.generate",
                "summary": "Generate a new podcast via Open Notebook",
                "tags": [
                    "Podcasts"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "source_type": {
                                        "type": "string",
                                        "enum": [
                                            "bookmark",
                                            "notebook",
                                            "text"
                                        ]
                                    },
                                    "source_id": {
                                        "type": "string"
                                    },
                                    "text": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 50000
                                    },
                                    "title": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    }
                                },
                                "required": [
                                    "source_type"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "500": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "const": "Failed to generate podcast"
                                                },
                                                "details": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "details"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "const": "Failed to start podcast generation"
                                                },
                                                "details": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "details"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "const": "Failed to create notebook for podcast"
                                                }
                                            },
                                            "required": [
                                                "error"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "403": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "AI features require an active subscription"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "messages": {
                                            "$ref": "#/components/schemas/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "error",
                                        "messages"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/podcasts/{podcastId}": {
            "get": {
                "operationId": "podcast.show",
                "summary": "Get a single podcast from Open Notebook",
                "tags": [
                    "Podcasts"
                ],
                "parameters": [
                    {
                        "name": "podcastId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "500": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "Failed to fetch podcast"
                                        },
                                        "details": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error",
                                        "details"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "Podcast not found"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "podcast.destroy",
                "summary": "Delete a podcast via Open Notebook",
                "tags": [
                    "Podcasts"
                ],
                "parameters": [
                    {
                        "name": "podcastId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "500": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "Failed to delete podcast"
                                        },
                                        "details": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error",
                                        "details"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Podcast deleted"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/podcasts/{podcastId}/stream": {
            "get": {
                "operationId": "podcast.stream",
                "summary": "Stream podcast audio file from Open Notebook",
                "tags": [
                    "Podcasts"
                ],
                "parameters": [
                    {
                        "name": "podcastId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "Unauthorized"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/podcasts/{podcastId}/status": {
            "get": {
                "operationId": "podcast.checkStatus",
                "summary": "Check podcast generation status from Open Notebook",
                "tags": [
                    "Podcasts"
                ],
                "parameters": [
                    {
                        "name": "podcastId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "500": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "Failed to check podcast status"
                                        },
                                        "details": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error",
                                        "details"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "Podcast not found"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/search": {
            "post": {
                "operationId": "search.search",
                "description": "`text` matches keywords; `vector` finds semantically similar content\n(uses AI embeddings, so it requires the account to be in good\nstanding).",
                "summary": "Search sources and notes",
                "tags": [
                    "Search"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "query": {
                                        "type": "string"
                                    },
                                    "type": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "text",
                                            "vector",
                                            null
                                        ]
                                    },
                                    "limit": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 100
                                    },
                                    "search_sources": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "search_notes": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "query"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/api/v1/search/ask": {
            "post": {
                "operationId": "search.ask",
                "description": "Synthesizes a cited AI answer from across the account's sources and\nnotes. Slower than search and uses AI credit.",
                "summary": "Ask your library a question",
                "tags": [
                    "Search"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "question": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "question"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/api/v1/sources": {
            "get": {
                "operationId": "source.index",
                "description": "Saved sources (links, files, text), optionally filtered to one\nnotebook.",
                "summary": "List sources",
                "tags": [
                    "Sources"
                ],
                "parameters": [
                    {
                        "name": "notebook_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {}
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "post": {
                "operationId": "source.store",
                "description": "Queues a link save: source creation, notebook attachment, snapshot, and\n(optionally) a quick podcast all run asynchronously. A 201 confirms the\nsave started, not that processing finished.",
                "summary": "Save a link",
                "tags": [
                    "Sources"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "maxLength": 2048
                                    },
                                    "title": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    },
                                    "notebook_ids": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "new_notebook_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "generate_quick_podcast": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "podcast_format": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "solo_expert",
                                            "deep_dive",
                                            "brief",
                                            "critique",
                                            "debate",
                                            "unabridged",
                                            null
                                        ]
                                    }
                                },
                                "required": [
                                    "url"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "integer",
                                    "const": 201
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/api/v1/sources/check": {
            "get": {
                "operationId": "source.check",
                "description": "Looks the URL up among the account's link sources.",
                "summary": "Check whether a URL is saved",
                "tags": [
                    "Sources"
                ],
                "parameters": [
                    {
                        "name": "url",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uri",
                            "maxLength": 2048
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "exists": {
                                            "type": "boolean"
                                        },
                                        "source": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "url": {
                                                    "type": "string"
                                                },
                                                "title": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "url",
                                                "title"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "exists",
                                        "source"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/api/webhooks/workflows/{token}": {
            "post": {
                "operationId": "webhooks.workflows",
                "description": "Starts every active workflow listening on this webhook token. The\n64-character token in the URL is the credential \u2014 it is scoped to a\nsingle workflow owner and can be regenerated from the workflow editor.\nThe JSON body becomes the workflow's trigger payload.",
                "summary": "Trigger a workflow",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "token",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Webhook received"
                                        },
                                        "runs": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "runs"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "Not found"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "Request must be JSON"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "description": "A personal API key from Settings (starts with `nbk_`) or an OAuth access token.",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "MessageBag": {
                "type": "object",
                "additionalProperties": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "title": "MessageBag"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            }
        }
    }
}