{
    "swagger": "2.0",
    "info": {
        "title": "Kadmo",
        "description": "Kadmo runs AI agents on the tickets of your team. Dispatch jobs, create tasks, run playbooks on them, and start your automations when a job finishes, a job needs input or a task is done.",
        "version": "1.0",
        "contact": {
            "name": "Kadmo Support",
            "url": "https://kadmo.ai/support",
            "email": "support@kadmo.ai"
        }
    },
    "host": "app.kadmo.ai",
    "basePath": "/api/v1",
    "schemes": [
        "https"
    ],
    "consumes": [
        "application/json"
    ],
    "produces": [
        "application/json"
    ],
    "paths": {
        "/jobs": {
            "post": {
                "operationId": "CreateJob",
                "summary": "Dispatch job",
                "description": "Queues a workflow in a workspace for one of your agents. A job can spend the credit of your account.",
                "x-ms-visibility": "important",
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/CreateJobRequest"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[\\x21-\\x7E]+$",
                        "x-ms-summary": "Idempotency Key",
                        "description": "A key of your own. The same key with the same request answers the first result again and starts nothing.",
                        "x-ms-visibility": "advanced"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "The job, queued.",
                        "schema": {
                            "$ref": "#/definitions/Job"
                        }
                    },
                    "400": {
                        "description": "Bad request. A field is missing, unknown or of the wrong kind."
                    },
                    "401": {
                        "description": "Unauthorized. The token is missing, revoked or of another kind."
                    },
                    "402": {
                        "description": "Payment required. The trial has ended, or the account has no credit left."
                    },
                    "404": {
                        "description": "Not found. The account has nothing of that name, key or ID."
                    },
                    "405": {
                        "description": "Method not allowed."
                    },
                    "409": {
                        "description": "Conflict. The same work is already there, or the request repeats a key."
                    },
                    "413": {
                        "description": "The request is too large."
                    },
                    "415": {
                        "description": "The request is not JSON."
                    },
                    "422": {
                        "description": "The request cannot be carried out as it stands."
                    },
                    "429": {
                        "description": "Too many requests. Retry later."
                    },
                    "500": {
                        "description": "Something went wrong at Kadmo. Retry later."
                    },
                    "503": {
                        "description": "A check could not run just now. Retry later."
                    }
                }
            }
        },
        "/jobs/{id}": {
            "get": {
                "operationId": "GetJob",
                "summary": "Get job",
                "description": "Gets a job with its status, its agent and, once it has finished, its result.",
                "x-ms-visibility": "important",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "type": "integer",
                        "x-ms-url-encoding": "single",
                        "minimum": 1,
                        "x-ms-summary": "Job ID",
                        "description": "The ID of the job."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The job.",
                        "schema": {
                            "$ref": "#/definitions/Job"
                        }
                    },
                    "401": {
                        "description": "Unauthorized. The token is missing, revoked or of another kind."
                    },
                    "404": {
                        "description": "Not found. The account has nothing of that name, key or ID."
                    },
                    "405": {
                        "description": "Method not allowed."
                    },
                    "429": {
                        "description": "Too many requests. Retry later."
                    },
                    "500": {
                        "description": "Something went wrong at Kadmo. Retry later."
                    }
                }
            }
        },
        "/tasks": {
            "post": {
                "operationId": "CreateTask",
                "summary": "Create task",
                "description": "Files a ticket in the tracker of the workspace, or as an internal task, and adds it to Tasks as pending. Run a playbook on the task to start work.",
                "x-ms-visibility": "important",
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/CreateTaskRequest"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[\\x21-\\x7E]+$",
                        "x-ms-summary": "Idempotency Key",
                        "description": "A key of your own. The same key with the same request answers the first result again and files nothing.",
                        "x-ms-visibility": "advanced"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "The task, pending.",
                        "schema": {
                            "$ref": "#/definitions/Task"
                        }
                    },
                    "400": {
                        "description": "Bad request. A field is missing, unknown or of the wrong kind."
                    },
                    "401": {
                        "description": "Unauthorized. The token is missing, revoked or of another kind."
                    },
                    "402": {
                        "description": "Payment required. The trial has ended, or the account has no credit left."
                    },
                    "404": {
                        "description": "Not found. The account has nothing of that name, key or ID."
                    },
                    "405": {
                        "description": "Method not allowed."
                    },
                    "409": {
                        "description": "Conflict. The same work is already there, or the request repeats a key."
                    },
                    "413": {
                        "description": "The request is too large."
                    },
                    "415": {
                        "description": "The request is not JSON."
                    },
                    "422": {
                        "description": "The request cannot be carried out as it stands."
                    },
                    "429": {
                        "description": "Too many requests. Retry later."
                    },
                    "500": {
                        "description": "Something went wrong at Kadmo. Retry later."
                    },
                    "502": {
                        "description": "The tracker or the orchestrator refused or failed."
                    }
                }
            }
        },
        "/tasks/{key}/runs": {
            "post": {
                "operationId": "RunTask",
                "summary": "Run playbook on a task",
                "description": "Approves a task with a playbook. The run starts at once when nothing holds it, and on its own later when something does.",
                "x-ms-visibility": "important",
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/RunTaskRequest"
                        }
                    },
                    {
                        "name": "key",
                        "in": "path",
                        "required": true,
                        "type": "string",
                        "x-ms-url-encoding": "single",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,99}$",
                        "x-ms-summary": "Task Key",
                        "description": "The key of the task, such as PROJ-123."
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[\\x21-\\x7E]+$",
                        "x-ms-summary": "Idempotency Key",
                        "description": "A key of your own. The same key with the same request answers the first result again and starts nothing.",
                        "x-ms-visibility": "advanced"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "The run started.",
                        "schema": {
                            "$ref": "#/definitions/TaskRunResult"
                        }
                    },
                    "202": {
                        "description": "The task is approved; the run starts once what it waits on clears."
                    },
                    "400": {
                        "description": "Bad request. A field is missing, unknown or of the wrong kind."
                    },
                    "401": {
                        "description": "Unauthorized. The token is missing, revoked or of another kind."
                    },
                    "402": {
                        "description": "Payment required. The trial has ended, or the account has no credit left."
                    },
                    "404": {
                        "description": "Not found. The account has nothing of that name, key or ID."
                    },
                    "405": {
                        "description": "Method not allowed."
                    },
                    "409": {
                        "description": "Conflict. The same work is already there, or the request repeats a key."
                    },
                    "413": {
                        "description": "The request is too large."
                    },
                    "415": {
                        "description": "The request is not JSON."
                    },
                    "422": {
                        "description": "The request cannot be carried out as it stands."
                    },
                    "429": {
                        "description": "Too many requests. Retry later."
                    },
                    "500": {
                        "description": "Something went wrong at Kadmo. Retry later."
                    },
                    "502": {
                        "description": "The tracker or the orchestrator refused or failed."
                    }
                }
            }
        },
        "/tasks/{key}": {
            "get": {
                "operationId": "GetTask",
                "summary": "Get task",
                "description": "Gets a task with its status, its playbook and its runs.",
                "x-ms-visibility": "important",
                "parameters": [
                    {
                        "name": "key",
                        "in": "path",
                        "required": true,
                        "type": "string",
                        "x-ms-url-encoding": "single",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,99}$",
                        "x-ms-summary": "Task Key",
                        "description": "The key of the task, such as PROJ-123."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The task.",
                        "schema": {
                            "$ref": "#/definitions/Task"
                        }
                    },
                    "401": {
                        "description": "Unauthorized. The token is missing, revoked or of another kind."
                    },
                    "404": {
                        "description": "Not found. The account has nothing of that name, key or ID."
                    },
                    "405": {
                        "description": "Method not allowed."
                    },
                    "429": {
                        "description": "Too many requests. Retry later."
                    },
                    "500": {
                        "description": "Something went wrong at Kadmo. Retry later."
                    }
                }
            }
        },
        "/workspaces": {
            "get": {
                "operationId": "ListWorkspaces",
                "summary": "List workspaces",
                "description": "Lists the active workspaces of the account.",
                "x-ms-visibility": "advanced",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The workspaces.",
                        "schema": {
                            "$ref": "#/definitions/WorkspaceList"
                        }
                    },
                    "401": {
                        "description": "Unauthorized. The token is missing, revoked or of another kind."
                    },
                    "405": {
                        "description": "Method not allowed."
                    },
                    "429": {
                        "description": "Too many requests. Retry later."
                    },
                    "500": {
                        "description": "Something went wrong at Kadmo. Retry later."
                    }
                }
            }
        },
        "/workflows": {
            "get": {
                "operationId": "ListWorkflows",
                "summary": "List workflows",
                "description": "Lists the workflows a job can run.",
                "x-ms-visibility": "advanced",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The workflows.",
                        "schema": {
                            "$ref": "#/definitions/WorkflowList"
                        }
                    },
                    "401": {
                        "description": "Unauthorized. The token is missing, revoked or of another kind."
                    },
                    "405": {
                        "description": "Method not allowed."
                    },
                    "429": {
                        "description": "Too many requests. Retry later."
                    },
                    "500": {
                        "description": "Something went wrong at Kadmo. Retry later."
                    }
                }
            }
        },
        "/playbooks": {
            "get": {
                "operationId": "ListPlaybooks",
                "summary": "List playbooks",
                "description": "Lists the playbooks a run can use.",
                "x-ms-visibility": "advanced",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The playbooks.",
                        "schema": {
                            "$ref": "#/definitions/PlaybookList"
                        }
                    },
                    "401": {
                        "description": "Unauthorized. The token is missing, revoked or of another kind."
                    },
                    "405": {
                        "description": "Method not allowed."
                    },
                    "429": {
                        "description": "Too many requests. Retry later."
                    },
                    "500": {
                        "description": "Something went wrong at Kadmo. Retry later."
                    }
                }
            }
        },
        "/me": {
            "get": {
                "operationId": "GetMe",
                "summary": "Get current member",
                "description": "Gets the member and the account the token acts as.",
                "x-ms-visibility": "internal",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The token's member and account.",
                        "schema": {
                            "$ref": "#/definitions/Me"
                        }
                    },
                    "401": {
                        "description": "Unauthorized. The token is missing, revoked or of another kind."
                    },
                    "405": {
                        "description": "Method not allowed."
                    },
                    "429": {
                        "description": "Too many requests. Retry later."
                    },
                    "500": {
                        "description": "Something went wrong at Kadmo. Retry later."
                    }
                }
            }
        },
        "/webhooks/{id}": {
            "delete": {
                "operationId": "DeleteWebhook",
                "summary": "Delete subscription",
                "description": "Deletes the subscription of a trigger.",
                "x-ms-visibility": "internal",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "type": "integer",
                        "x-ms-url-encoding": "single",
                        "minimum": 1,
                        "x-ms-summary": "Subscription ID",
                        "description": "The ID of the subscription."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The subscription is deleted.",
                        "schema": {
                            "$ref": "#/definitions/WebhookDeleted"
                        }
                    },
                    "401": {
                        "description": "Unauthorized. The token is missing, revoked or of another kind."
                    },
                    "404": {
                        "description": "Not found. The account has nothing of that name, key or ID."
                    },
                    "405": {
                        "description": "Method not allowed."
                    },
                    "429": {
                        "description": "Too many requests. Retry later."
                    },
                    "500": {
                        "description": "Something went wrong at Kadmo. Retry later."
                    }
                }
            }
        },
        "/triggers/job-finished": {
            "x-ms-notification-content": {
                "description": "This operation triggers when a job succeeds, fails or is cancelled.",
                "schema": {
                    "$ref": "#/definitions/OnJobFinishedEvent"
                }
            },
            "post": {
                "operationId": "OnJobFinished",
                "summary": "When a job finishes",
                "description": "This operation triggers when a job succeeds, fails or is cancelled.",
                "x-ms-trigger": "single",
                "x-ms-trigger-hint": "To see it work, dispatch a job and wait until it has finished.",
                "x-ms-visibility": "important",
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/OnJobFinishedRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "The subscription.",
                        "schema": {
                            "$ref": "#/definitions/Webhook"
                        }
                    },
                    "400": {
                        "description": "Bad request. A field is missing, unknown or of the wrong kind."
                    },
                    "401": {
                        "description": "Unauthorized. The token is missing, revoked or of another kind."
                    },
                    "402": {
                        "description": "Payment required. The trial has ended, or the account has no credit left."
                    },
                    "404": {
                        "description": "Not found. The account has nothing of that name, key or ID."
                    },
                    "405": {
                        "description": "Method not allowed."
                    },
                    "409": {
                        "description": "Conflict. The same work is already there, or the request repeats a key."
                    },
                    "413": {
                        "description": "The request is too large."
                    },
                    "415": {
                        "description": "The request is not JSON."
                    },
                    "422": {
                        "description": "The request cannot be carried out as it stands."
                    },
                    "429": {
                        "description": "Too many requests. Retry later."
                    },
                    "500": {
                        "description": "Something went wrong at Kadmo. Retry later."
                    },
                    "503": {
                        "description": "A check could not run just now. Retry later."
                    }
                }
            }
        },
        "/triggers/job-needs-input": {
            "x-ms-notification-content": {
                "description": "This operation triggers when a job waits on a person for an answer or an approval.",
                "schema": {
                    "$ref": "#/definitions/OnJobNeedsInputEvent"
                }
            },
            "post": {
                "operationId": "OnJobNeedsInput",
                "summary": "When a job needs input",
                "description": "This operation triggers when a job waits on a person for an answer or an approval.",
                "x-ms-trigger": "single",
                "x-ms-trigger-hint": "To see it work, run a job whose agent asks a question.",
                "x-ms-visibility": "important",
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/OnJobNeedsInputRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "The subscription.",
                        "schema": {
                            "$ref": "#/definitions/Webhook"
                        }
                    },
                    "400": {
                        "description": "Bad request. A field is missing, unknown or of the wrong kind."
                    },
                    "401": {
                        "description": "Unauthorized. The token is missing, revoked or of another kind."
                    },
                    "402": {
                        "description": "Payment required. The trial has ended, or the account has no credit left."
                    },
                    "404": {
                        "description": "Not found. The account has nothing of that name, key or ID."
                    },
                    "405": {
                        "description": "Method not allowed."
                    },
                    "409": {
                        "description": "Conflict. The same work is already there, or the request repeats a key."
                    },
                    "413": {
                        "description": "The request is too large."
                    },
                    "415": {
                        "description": "The request is not JSON."
                    },
                    "422": {
                        "description": "The request cannot be carried out as it stands."
                    },
                    "429": {
                        "description": "Too many requests. Retry later."
                    },
                    "500": {
                        "description": "Something went wrong at Kadmo. Retry later."
                    },
                    "503": {
                        "description": "A check could not run just now. Retry later."
                    }
                }
            }
        },
        "/triggers/task-done": {
            "x-ms-notification-content": {
                "description": "This operation triggers when the run of a task has resolved it.",
                "schema": {
                    "$ref": "#/definitions/OnTaskDoneEvent"
                }
            },
            "post": {
                "operationId": "OnTaskDone",
                "summary": "When a task is done",
                "description": "This operation triggers when the run of a task has resolved it.",
                "x-ms-trigger": "single",
                "x-ms-trigger-hint": "To see it work, run a playbook on a task and wait until the task is done.",
                "x-ms-visibility": "important",
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/OnTaskDoneRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "The subscription.",
                        "schema": {
                            "$ref": "#/definitions/Webhook"
                        }
                    },
                    "400": {
                        "description": "Bad request. A field is missing, unknown or of the wrong kind."
                    },
                    "401": {
                        "description": "Unauthorized. The token is missing, revoked or of another kind."
                    },
                    "402": {
                        "description": "Payment required. The trial has ended, or the account has no credit left."
                    },
                    "404": {
                        "description": "Not found. The account has nothing of that name, key or ID."
                    },
                    "405": {
                        "description": "Method not allowed."
                    },
                    "409": {
                        "description": "Conflict. The same work is already there, or the request repeats a key."
                    },
                    "413": {
                        "description": "The request is too large."
                    },
                    "415": {
                        "description": "The request is not JSON."
                    },
                    "422": {
                        "description": "The request cannot be carried out as it stands."
                    },
                    "429": {
                        "description": "Too many requests. Retry later."
                    },
                    "500": {
                        "description": "Something went wrong at Kadmo. Retry later."
                    },
                    "503": {
                        "description": "A check could not run just now. Retry later."
                    }
                }
            }
        }
    },
    "definitions": {
        "Me": {
            "type": "object",
            "properties": {
                "user": {
                    "description": "The member the token acts as.",
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": "integer",
                            "minimum": 1,
                            "x-ms-summary": "Member ID",
                            "description": "The ID of the member."
                        },
                        "name": {
                            "type": "string",
                            "x-ms-summary": "Member Name",
                            "description": "The name of the member."
                        },
                        "email": {
                            "type": "string",
                            "x-ms-summary": "Member Email",
                            "description": "The email address of the member."
                        }
                    },
                    "required": [
                        "id",
                        "name",
                        "email"
                    ],
                    "x-ms-summary": "Member"
                },
                "account": {
                    "description": "The Kadmo account of the member.",
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": "integer",
                            "minimum": 1,
                            "x-ms-summary": "Account ID",
                            "description": "The ID of the account."
                        },
                        "name": {
                            "type": "string",
                            "x-ms-summary": "Account Name",
                            "description": "The name of the account."
                        },
                        "slug": {
                            "type": "string",
                            "x-ms-summary": "Account Slug",
                            "description": "The slug of the account."
                        }
                    },
                    "required": [
                        "id",
                        "name",
                        "slug"
                    ],
                    "x-ms-summary": "Account"
                },
                "role": {
                    "description": "The role of the member in the account: admin or member.",
                    "type": "string",
                    "enum": [
                        "admin",
                        "member"
                    ],
                    "x-ms-summary": "Role"
                },
                "token": {
                    "description": "The API token the connection uses.",
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": "integer",
                            "minimum": 1,
                            "x-ms-summary": "Token ID",
                            "description": "The ID of the token."
                        },
                        "name": {
                            "type": "string",
                            "x-ms-summary": "Token Name",
                            "description": "The name of the token."
                        }
                    },
                    "required": [
                        "id",
                        "name"
                    ],
                    "x-ms-summary": "Token"
                }
            },
            "required": [
                "user",
                "account",
                "role",
                "token"
            ]
        },
        "Job": {
            "type": "object",
            "properties": {
                "id": {
                    "description": "The ID of the job, given when it is dispatched.",
                    "type": "integer",
                    "minimum": 1,
                    "x-ms-summary": "Job ID"
                },
                "status": {
                    "description": "The status of the job: queued, running, needs_input, succeeded, failed or cancelled.",
                    "type": "string",
                    "enum": [
                        "queued",
                        "running",
                        "needs_input",
                        "succeeded",
                        "failed",
                        "cancelled"
                    ],
                    "x-ms-summary": "Status"
                },
                "workflow": {
                    "description": "The workflow the job runs.",
                    "type": "string",
                    "x-ms-summary": "Workflow"
                },
                "workspace": {
                    "description": "The workspace the job belongs to.",
                    "type": "object",
                    "properties": {
                        "slug": {
                            "type": "string",
                            "x-ms-summary": "Workspace Slug",
                            "description": "The slug of the workspace."
                        },
                        "name": {
                            "type": "string",
                            "x-ms-summary": "Workspace Name",
                            "description": "The name of the workspace."
                        }
                    },
                    "required": [
                        "slug",
                        "name"
                    ],
                    "x-ms-summary": "Workspace"
                },
                "task": {
                    "type": "object",
                    "properties": {
                        "key": {
                            "type": "string",
                            "x-ms-summary": "Task Key",
                            "description": "The key of the task."
                        },
                        "url": {
                            "description": "The link of the task.",
                            "type": "string",
                            "x-ms-summary": "Task URL"
                        }
                    },
                    "required": [
                        "key",
                        "url"
                    ],
                    "description": "The task the job works on, when it names one.",
                    "x-ms-summary": "Task"
                },
                "input": {
                    "description": "The inputs the job was dispatched with.",
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    },
                    "x-ms-summary": "Inputs"
                },
                "created_by": {
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": "integer",
                            "minimum": 1,
                            "x-ms-summary": "Dispatched By ID",
                            "description": "The ID of the member."
                        },
                        "name": {
                            "type": "string",
                            "x-ms-summary": "Dispatched By Name",
                            "description": "The name of the member."
                        }
                    },
                    "required": [
                        "id",
                        "name"
                    ],
                    "description": "The member who dispatched the job.",
                    "x-ms-summary": "Dispatched By"
                },
                "agent": {
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": "integer",
                            "minimum": 1,
                            "x-ms-summary": "Agent ID",
                            "description": "The ID of the agent."
                        },
                        "name": {
                            "type": "string",
                            "x-ms-summary": "Agent Name",
                            "description": "The name of the agent."
                        }
                    },
                    "required": [
                        "id",
                        "name"
                    ],
                    "description": "The agent that took the job. Empty while the job is queued.",
                    "x-ms-summary": "Agent"
                },
                "run": {
                    "description": "The playbook run the job is a step of.",
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": "integer",
                            "minimum": 1,
                            "x-ms-summary": "Playbook Run ID",
                            "description": "The ID of the playbook run."
                        },
                        "status": {
                            "description": "The status of the playbook run.",
                            "type": "string",
                            "enum": [
                                "running",
                                "waiting",
                                "paused",
                                "finished",
                                "failed",
                                "cancelled"
                            ],
                            "x-ms-summary": "Playbook Run Status"
                        },
                        "outcome": {
                            "type": "string",
                            "enum": [
                                "resolved",
                                "no_action",
                                "escalated",
                                "rework"
                            ],
                            "description": "How the finished run ended.",
                            "x-ms-summary": "Playbook Run Outcome"
                        },
                        "step_index": {
                            "description": "The step the run is on, counted from 0.",
                            "minimum": 0,
                            "type": "integer",
                            "x-ms-summary": "Playbook Run Step"
                        },
                        "playbook": {
                            "type": "object",
                            "properties": {
                                "slug": {
                                    "type": "string",
                                    "x-ms-summary": "Playbook Slug",
                                    "description": "The slug of the playbook."
                                },
                                "name": {
                                    "type": "string",
                                    "x-ms-summary": "Playbook Name",
                                    "description": "The name of the playbook."
                                }
                            },
                            "required": [
                                "slug",
                                "name"
                            ],
                            "x-ms-summary": "Playbook",
                            "description": "The playbook of the run."
                        },
                        "url": {
                            "description": "The link of the playbook run.",
                            "type": "string",
                            "x-ms-summary": "Playbook Run URL"
                        }
                    },
                    "required": [
                        "id",
                        "status",
                        "outcome",
                        "step_index",
                        "playbook",
                        "url"
                    ],
                    "x-ms-summary": "Playbook Run"
                },
                "needs_input": {
                    "type": "object",
                    "properties": {
                        "reason": {
                            "type": "string",
                            "enum": [
                                "approval",
                                "question"
                            ],
                            "x-ms-summary": "Needs Input Reason",
                            "description": "Whether the job waits on an approval or on a question."
                        },
                        "question": {
                            "description": "What the person is asked.",
                            "type": "string",
                            "x-ms-summary": "Question"
                        },
                        "options": {
                            "description": "The answers the agent offered.",
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-ms-summary": "Offered Answer",
                                "description": "An answer the agent offered."
                            },
                            "x-ms-summary": "Offered Answers"
                        },
                        "asked_at": {
                            "description": "When the question was asked.",
                            "type": "string",
                            "x-ms-summary": "Asked At"
                        },
                        "url": {
                            "description": "The link of the page where it is answered.",
                            "type": "string",
                            "x-ms-summary": "Where to Answer (URL)"
                        }
                    },
                    "required": [
                        "reason",
                        "question",
                        "options",
                        "asked_at",
                        "url"
                    ],
                    "description": "What the job waits on while it needs input.",
                    "x-ms-summary": "Needs Input"
                },
                "result": {
                    "type": "object",
                    "properties": {
                        "verdict": {
                            "type": "string",
                            "x-ms-summary": "Result Verdict",
                            "description": "The verdict of the agent."
                        },
                        "summary": {
                            "type": "string",
                            "x-ms-summary": "Result Summary",
                            "description": "The summary of the agent."
                        },
                        "pull_requests": {
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "description": "The link of the pull request.",
                                        "type": "string",
                                        "x-ms-summary": "Pull Request URL"
                                    },
                                    "number": {
                                        "type": "integer",
                                        "x-ms-summary": "Pull Request Number",
                                        "description": "The number of the pull request."
                                    },
                                    "repository": {
                                        "type": "string",
                                        "x-ms-summary": "Pull Request Repository",
                                        "description": "The repository of the pull request."
                                    }
                                },
                                "required": [
                                    "url",
                                    "number",
                                    "repository"
                                ]
                            },
                            "x-ms-summary": "Pull Requests",
                            "description": "The pull requests the job reported."
                        },
                        "evidence": {
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "x-ms-summary": "Evidence Label",
                                        "description": "The label of the link."
                                    },
                                    "url": {
                                        "description": "The link itself.",
                                        "type": "string",
                                        "x-ms-summary": "Evidence URL"
                                    }
                                },
                                "required": [
                                    "label",
                                    "url"
                                ]
                            },
                            "x-ms-summary": "Evidence",
                            "description": "The links the agent gave as evidence."
                        }
                    },
                    "required": [
                        "verdict",
                        "summary",
                        "pull_requests",
                        "evidence"
                    ],
                    "description": "What the agent reported once the job had ended.",
                    "x-ms-summary": "Result"
                },
                "files": {
                    "description": "The files the job published, in the order they arrived.",
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "description": "The ID of the file in Kadmo.",
                                "type": "integer",
                                "minimum": 1,
                                "x-ms-summary": "File ID"
                            },
                            "name": {
                                "description": "The name of the file.",
                                "type": "string",
                                "x-ms-summary": "File Name"
                            },
                            "url": {
                                "description": "The link of the file in Kadmo, which opens after sign-in.",
                                "type": "string",
                                "x-ms-summary": "File URL"
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "url"
                        ]
                    },
                    "x-ms-summary": "Files"
                },
                "error": {
                    "description": "Why the job failed or was cancelled.",
                    "type": "string",
                    "x-ms-summary": "Error"
                },
                "app_job_id": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "The number of the job in Kadmo, once an agent took it.",
                    "x-ms-summary": "Job Number in Kadmo"
                },
                "url": {
                    "description": "The link of the job in Kadmo.",
                    "type": "string",
                    "x-ms-summary": "Job URL"
                },
                "created_at": {
                    "description": "When the job was dispatched.",
                    "type": "string",
                    "x-ms-summary": "Created At"
                },
                "started_at": {
                    "description": "When an agent started the job.",
                    "type": "string",
                    "x-ms-summary": "Started At"
                },
                "finished_at": {
                    "description": "When the job ended.",
                    "type": "string",
                    "x-ms-summary": "Finished At"
                }
            },
            "required": [
                "id",
                "status",
                "workflow",
                "workspace",
                "task",
                "input",
                "created_by",
                "agent",
                "run",
                "needs_input",
                "result",
                "files",
                "error",
                "app_job_id",
                "url",
                "created_at",
                "started_at",
                "finished_at"
            ]
        },
        "Workspace": {
            "type": "object",
            "properties": {
                "slug": {
                    "description": "The slug of the workspace, which the other actions take.",
                    "type": "string",
                    "x-ms-summary": "Workspace Slug"
                },
                "name": {
                    "type": "string",
                    "x-ms-summary": "Workspace Name",
                    "description": "The name of the workspace."
                },
                "new_tasks": {
                    "description": "Where a task created in the workspace is filed.",
                    "type": "object",
                    "properties": {
                        "tracker": {
                            "type": "string",
                            "enum": [
                                "internal",
                                "jira",
                                "linear",
                                "notion"
                            ],
                            "x-ms-summary": "New Tasks Tracker",
                            "description": "The tracker a new task is filed in: internal, jira, linear or notion."
                        },
                        "project": {
                            "description": "The project or team of the tracker. Empty for an internal task.",
                            "type": "string",
                            "x-ms-summary": "New Tasks Project"
                        }
                    },
                    "required": [
                        "tracker",
                        "project"
                    ],
                    "x-ms-summary": "New Tasks"
                }
            },
            "required": [
                "slug",
                "name",
                "new_tasks"
            ]
        },
        "WorkspaceList": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Workspace"
                    },
                    "x-ms-summary": "Workspaces",
                    "description": "The active workspaces of the account."
                }
            },
            "required": [
                "data"
            ]
        },
        "Workflow": {
            "type": "object",
            "properties": {
                "name": {
                    "description": "The name of the workflow, which Dispatch job takes.",
                    "type": "string",
                    "x-ms-summary": "Workflow Name"
                },
                "description": {
                    "type": "string",
                    "x-ms-summary": "Workflow Description",
                    "description": "What the workflow does."
                },
                "parameters": {
                    "description": "The inputs the workflow reads.",
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string",
                                "x-ms-summary": "Input Name",
                                "description": "The name of the input."
                            },
                            "required": {
                                "description": "Whether a job must give the input. False when the workflow has a default for it.",
                                "type": "boolean",
                                "x-ms-summary": "Input Required"
                            },
                            "default": {
                                "type": "string",
                                "x-ms-summary": "Input Default",
                                "description": "The value the workflow uses when a job gives none."
                            }
                        },
                        "required": [
                            "name",
                            "required",
                            "default"
                        ]
                    },
                    "x-ms-summary": "Workflow Inputs"
                }
            },
            "required": [
                "name",
                "description",
                "parameters"
            ]
        },
        "WorkflowList": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Workflow"
                    },
                    "x-ms-summary": "Workflows",
                    "description": "The workflows a job can run."
                }
            },
            "required": [
                "data"
            ]
        },
        "Playbook": {
            "type": "object",
            "properties": {
                "slug": {
                    "description": "The slug of the playbook, which Run playbook on a task takes.",
                    "type": "string",
                    "x-ms-summary": "Playbook Slug"
                },
                "name": {
                    "type": "string",
                    "x-ms-summary": "Playbook Name",
                    "description": "The name of the playbook."
                },
                "description": {
                    "type": "string",
                    "x-ms-summary": "Playbook Description",
                    "description": "What the playbook does."
                },
                "steps": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "role": {
                                "type": "string",
                                "x-ms-summary": "Step Role",
                                "description": "The role of the agent that does the step."
                            },
                            "workflow": {
                                "type": "string",
                                "x-ms-summary": "Step Workflow",
                                "description": "The workflow the step runs."
                            }
                        },
                        "required": [
                            "role",
                            "workflow"
                        ]
                    },
                    "x-ms-summary": "Playbook Steps",
                    "description": "The steps of the playbook, in order."
                }
            },
            "required": [
                "slug",
                "name",
                "description",
                "steps"
            ]
        },
        "PlaybookList": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Playbook"
                    },
                    "x-ms-summary": "Playbooks",
                    "description": "The playbooks a run can use."
                }
            },
            "required": [
                "data"
            ]
        },
        "TaskRun": {
            "description": "A playbook run on the task.",
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer",
                    "minimum": 1,
                    "x-ms-summary": "Run ID",
                    "description": "The ID of the playbook run."
                },
                "status": {
                    "description": "The status of the run: running, waiting, paused, finished, failed or cancelled.",
                    "type": "string",
                    "enum": [
                        "running",
                        "waiting",
                        "paused",
                        "finished",
                        "failed",
                        "cancelled"
                    ],
                    "x-ms-summary": "Run Status"
                },
                "outcome": {
                    "type": "string",
                    "enum": [
                        "resolved",
                        "no_action",
                        "escalated",
                        "rework"
                    ],
                    "description": "How the finished run ended: resolved, no_action, escalated or rework.",
                    "x-ms-summary": "Run Outcome"
                },
                "step_index": {
                    "description": "The step the run is on, counted from 0.",
                    "minimum": 0,
                    "type": "integer",
                    "x-ms-summary": "Run Step"
                },
                "playbook": {
                    "type": "object",
                    "properties": {
                        "slug": {
                            "type": "string",
                            "x-ms-summary": "Run Playbook Slug",
                            "description": "The slug of the playbook."
                        },
                        "name": {
                            "type": "string",
                            "x-ms-summary": "Run Playbook Name",
                            "description": "The name of the playbook."
                        }
                    },
                    "required": [
                        "slug",
                        "name"
                    ],
                    "x-ms-summary": "Run Playbook",
                    "description": "The playbook of the run."
                },
                "url": {
                    "description": "The link of the run in Kadmo.",
                    "type": "string",
                    "x-ms-summary": "Run URL"
                },
                "created_at": {
                    "description": "When the run started.",
                    "type": "string",
                    "x-ms-summary": "Run Started At"
                },
                "finished_at": {
                    "description": "When the run ended.",
                    "type": "string",
                    "x-ms-summary": "Run Finished At"
                }
            },
            "required": [
                "id",
                "status",
                "outcome",
                "step_index",
                "playbook",
                "url",
                "created_at",
                "finished_at"
            ]
        },
        "Task": {
            "type": "object",
            "properties": {
                "key": {
                    "description": "The key of the task, such as PROJ-123.",
                    "type": "string",
                    "x-ms-summary": "Task Key"
                },
                "id": {
                    "description": "The ID of the task in Kadmo.",
                    "type": "integer",
                    "minimum": 1,
                    "x-ms-summary": "Task ID"
                },
                "title": {
                    "type": "string",
                    "x-ms-summary": "Task Title",
                    "description": "The title of the task."
                },
                "type": {
                    "description": "The issue type of the task, such as Task, Bug or Story.",
                    "type": "string",
                    "x-ms-summary": "Task Type"
                },
                "status": {
                    "description": "The status of the task: pending, waiting, running, paused, done, failed or cancelled.",
                    "type": "string",
                    "enum": [
                        "pending",
                        "waiting",
                        "running",
                        "paused",
                        "done",
                        "failed",
                        "cancelled"
                    ],
                    "x-ms-summary": "Task Status"
                },
                "in_pool": {
                    "description": "False once the task was archived from Tasks.",
                    "type": "boolean",
                    "x-ms-summary": "In Tasks"
                },
                "tracker": {
                    "description": "Where the task is filed: internal, jira, linear or notion.",
                    "type": "string",
                    "enum": [
                        "internal",
                        "jira",
                        "linear",
                        "notion"
                    ],
                    "x-ms-summary": "Task Tracker"
                },
                "workspace": {
                    "description": "The workspace the task belongs to.",
                    "type": "object",
                    "properties": {
                        "slug": {
                            "type": "string",
                            "x-ms-summary": "Task Workspace Slug",
                            "description": "The slug of the workspace."
                        },
                        "name": {
                            "type": "string",
                            "x-ms-summary": "Task Workspace Name",
                            "description": "The name of the workspace."
                        }
                    },
                    "required": [
                        "slug",
                        "name"
                    ],
                    "x-ms-summary": "Task Workspace"
                },
                "priority": {
                    "type": "string",
                    "enum": [
                        "highest",
                        "high",
                        "medium",
                        "low",
                        "lowest"
                    ],
                    "x-ms-summary": "Task Priority",
                    "description": "The priority of the task: highest, high, medium, low or lowest."
                },
                "playbook": {
                    "type": "object",
                    "properties": {
                        "slug": {
                            "type": "string",
                            "x-ms-summary": "Task Playbook Slug",
                            "description": "The slug of the playbook."
                        },
                        "name": {
                            "type": "string",
                            "x-ms-summary": "Task Playbook Name",
                            "description": "The name of the playbook."
                        }
                    },
                    "required": [
                        "slug",
                        "name"
                    ],
                    "description": "The playbook the task was approved with.",
                    "x-ms-summary": "Task Playbook"
                },
                "run": {
                    "$ref": "#/definitions/TaskRun"
                },
                "runs": {
                    "description": "The playbook runs of the task, newest first, at most 20.",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/TaskRun"
                    },
                    "x-ms-summary": "Task Runs"
                },
                "url": {
                    "description": "The link of the task.",
                    "type": "string",
                    "x-ms-summary": "Task URL"
                },
                "created_at": {
                    "description": "When the task was created.",
                    "type": "string",
                    "x-ms-summary": "Task Created At"
                },
                "updated_at": {
                    "description": "When the task last changed.",
                    "type": "string",
                    "x-ms-summary": "Task Updated At"
                }
            },
            "required": [
                "key",
                "id",
                "title",
                "type",
                "status",
                "in_pool",
                "tracker",
                "workspace",
                "priority",
                "playbook",
                "run",
                "runs",
                "url",
                "created_at",
                "updated_at"
            ]
        },
        "TaskRunResult": {
            "type": "object",
            "properties": {
                "task": {
                    "$ref": "#/definitions/Task"
                },
                "run": {
                    "$ref": "#/definitions/TaskRun"
                },
                "waiting_on": {
                    "type": "object",
                    "properties": {
                        "reason": {
                            "description": "Why the run waits: blocked_by, pool_full, person_step, blocker_failed, role_not_runnable or retrying.",
                            "type": "string",
                            "enum": [
                                "blocked_by",
                                "pool_full",
                                "person_step",
                                "blocker_failed",
                                "role_not_runnable",
                                "retrying"
                            ],
                            "x-ms-summary": "Waiting Reason"
                        },
                        "blockers": {
                            "description": "The keys of the tasks the run waits for.",
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-ms-summary": "Blocking Task",
                                "description": "The key of a task the run waits for."
                            },
                            "x-ms-summary": "Blocking Tasks"
                        },
                        "message": {
                            "type": "string",
                            "x-ms-summary": "Waiting Message",
                            "description": "What the run waits for, in words."
                        }
                    },
                    "required": [
                        "reason",
                        "blockers",
                        "message"
                    ],
                    "description": "Why the run has not started yet. Empty when it started.",
                    "x-ms-summary": "Waiting On"
                }
            },
            "required": [
                "task",
                "run",
                "waiting_on"
            ]
        },
        "Webhook": {
            "type": "object",
            "properties": {
                "id": {
                    "description": "The ID of the subscription.",
                    "type": "integer",
                    "minimum": 1,
                    "x-ms-summary": "Subscription ID"
                },
                "url": {
                    "description": "The address the events are sent to.",
                    "type": "string",
                    "x-ms-summary": "Callback URL"
                },
                "events": {
                    "description": "The events the subscription takes.",
                    "type": "array",
                    "items": {
                        "description": "An event the subscription takes.",
                        "type": "string",
                        "enum": [
                            "job.finished",
                            "job.needs_input",
                            "task.done"
                        ],
                        "x-ms-summary": "Event"
                    },
                    "x-ms-summary": "Events"
                },
                "workspace": {
                    "description": "The workspace the subscription is kept to. Empty for every workspace.",
                    "type": "object",
                    "properties": {
                        "slug": {
                            "type": "string",
                            "x-ms-summary": "Subscription Workspace Slug",
                            "description": "The slug of the workspace."
                        },
                        "name": {
                            "type": "string",
                            "x-ms-summary": "Subscription Workspace Name",
                            "description": "The name of the workspace."
                        }
                    },
                    "required": [
                        "slug",
                        "name"
                    ],
                    "x-ms-summary": "Subscription Workspace"
                },
                "status": {
                    "description": "Whether the subscription is active or disabled.",
                    "type": "string",
                    "enum": [
                        "active",
                        "disabled"
                    ],
                    "x-ms-summary": "Subscription Status"
                },
                "disabled_reason": {
                    "type": "string",
                    "enum": [
                        "failing",
                        "gone"
                    ],
                    "description": "Why Kadmo disabled the subscription: failing or gone.",
                    "x-ms-summary": "Disabled Reason"
                },
                "created_by": {
                    "description": "The member who made the subscription.",
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": "integer",
                            "minimum": 1,
                            "x-ms-summary": "Subscribed By ID",
                            "description": "The ID of the member."
                        },
                        "name": {
                            "type": "string",
                            "x-ms-summary": "Subscribed By Name",
                            "description": "The name of the member."
                        }
                    },
                    "required": [
                        "id",
                        "name"
                    ],
                    "x-ms-summary": "Subscribed By"
                },
                "created_at": {
                    "description": "When the subscription was made.",
                    "type": "string",
                    "x-ms-summary": "Subscribed At"
                },
                "last_delivery_at": {
                    "description": "When an event was last delivered.",
                    "type": "string",
                    "x-ms-summary": "Last Delivery At"
                }
            },
            "required": [
                "id",
                "url",
                "events",
                "workspace",
                "status",
                "disabled_reason",
                "created_by",
                "created_at",
                "last_delivery_at"
            ]
        },
        "WebhookDeleted": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer",
                    "minimum": 1,
                    "x-ms-summary": "Subscription ID",
                    "description": "The ID of the deleted subscription."
                },
                "deleted": {
                    "type": "boolean",
                    "enum": [
                        true
                    ],
                    "x-ms-summary": "Deleted",
                    "description": "Always true."
                }
            },
            "required": [
                "id",
                "deleted"
            ]
        },
        "CreateJobRequest": {
            "type": "object",
            "properties": {
                "workflow": {
                    "description": "The workflow to run.",
                    "minLength": 1,
                    "maxLength": 200,
                    "type": "string",
                    "x-ms-summary": "Workflow",
                    "x-ms-visibility": "important",
                    "x-ms-dynamic-values": {
                        "operationId": "ListWorkflows",
                        "value-collection": "data",
                        "value-path": "name",
                        "value-title": "name",
                        "parameters": {}
                    },
                    "x-ms-dynamic-list": {
                        "operationId": "ListWorkflows",
                        "itemsPath": "data",
                        "itemValuePath": "name",
                        "itemTitlePath": "name",
                        "parameters": {}
                    }
                },
                "workspace": {
                    "description": "The workspace the job runs in.",
                    "minLength": 1,
                    "maxLength": 200,
                    "type": "string",
                    "x-ms-summary": "Workspace",
                    "x-ms-visibility": "important",
                    "x-ms-dynamic-values": {
                        "operationId": "ListWorkspaces",
                        "value-collection": "data",
                        "value-path": "slug",
                        "value-title": "name",
                        "parameters": {}
                    },
                    "x-ms-dynamic-list": {
                        "operationId": "ListWorkspaces",
                        "itemsPath": "data",
                        "itemValuePath": "slug",
                        "itemTitlePath": "name",
                        "parameters": {}
                    }
                },
                "input": {
                    "description": "The inputs of the workflow, by name.",
                    "type": "object",
                    "additionalProperties": {
                        "maxLength": 20000,
                        "type": "string"
                    },
                    "x-ms-summary": "Inputs",
                    "properties": {
                        "ticket_url": {
                            "maxLength": 20000,
                            "type": "string",
                            "x-ms-summary": "Ticket URL",
                            "description": "The link of the ticket the job works on."
                        },
                        "hint": {
                            "maxLength": 20000,
                            "type": "string",
                            "x-ms-summary": "Hint",
                            "description": "A note the agent reads."
                        }
                    }
                },
                "effort": {
                    "description": "An effort tier of your account, such as low, medium or high. Leave empty for the default of the workflow.",
                    "pattern": "^[a-z0-9][a-z0-9_-]{0,39}$",
                    "type": "string",
                    "x-ms-summary": "Effort",
                    "x-ms-visibility": "advanced"
                }
            },
            "required": [
                "workflow",
                "workspace"
            ],
            "additionalProperties": false
        },
        "CreateTaskRequest": {
            "type": "object",
            "properties": {
                "workspace": {
                    "description": "The workspace the task belongs to.",
                    "minLength": 1,
                    "maxLength": 200,
                    "type": "string",
                    "x-ms-summary": "Workspace",
                    "x-ms-visibility": "important",
                    "x-ms-dynamic-values": {
                        "operationId": "ListWorkspaces",
                        "value-collection": "data",
                        "value-path": "slug",
                        "value-title": "name",
                        "parameters": {}
                    },
                    "x-ms-dynamic-list": {
                        "operationId": "ListWorkspaces",
                        "itemsPath": "data",
                        "itemValuePath": "slug",
                        "itemTitlePath": "name",
                        "parameters": {}
                    }
                },
                "title": {
                    "description": "The title of the ticket.",
                    "minLength": 1,
                    "maxLength": 255,
                    "type": "string",
                    "x-ms-summary": "Title",
                    "x-ms-visibility": "important"
                },
                "description": {
                    "description": "The description of the ticket, as plain text or Markdown.",
                    "maxLength": 100000,
                    "type": "string",
                    "x-ms-summary": "Description"
                },
                "type": {
                    "description": "The issue type. Task when empty.",
                    "minLength": 1,
                    "maxLength": 100,
                    "type": "string",
                    "x-ms-summary": "Type",
                    "x-ms-visibility": "advanced"
                },
                "priority": {
                    "type": "string",
                    "enum": [
                        "highest",
                        "high",
                        "medium",
                        "low",
                        "lowest"
                    ],
                    "x-ms-summary": "Priority",
                    "description": "The priority of the ticket.",
                    "x-ms-visibility": "advanced"
                },
                "tracker": {
                    "description": "Where the task is filed. The tracker of the workspace when empty, or internal for a Kadmo task.",
                    "type": "string",
                    "enum": [
                        "workspace",
                        "internal"
                    ],
                    "x-ms-summary": "Tracker",
                    "x-ms-visibility": "advanced"
                }
            },
            "required": [
                "workspace",
                "title"
            ],
            "additionalProperties": false
        },
        "RunTaskRequest": {
            "type": "object",
            "properties": {
                "playbook": {
                    "description": "The playbook to run.",
                    "minLength": 1,
                    "maxLength": 200,
                    "type": "string",
                    "x-ms-summary": "Playbook",
                    "x-ms-visibility": "important",
                    "x-ms-dynamic-values": {
                        "operationId": "ListPlaybooks",
                        "value-collection": "data",
                        "value-path": "slug",
                        "value-title": "name",
                        "parameters": {}
                    },
                    "x-ms-dynamic-list": {
                        "operationId": "ListPlaybooks",
                        "itemsPath": "data",
                        "itemValuePath": "slug",
                        "itemTitlePath": "name",
                        "parameters": {}
                    }
                },
                "workspace": {
                    "description": "The workspace to run in. Leave empty for the workspace of the task.",
                    "minLength": 1,
                    "maxLength": 200,
                    "type": "string",
                    "x-ms-summary": "Workspace",
                    "x-ms-visibility": "advanced",
                    "x-ms-dynamic-values": {
                        "operationId": "ListWorkspaces",
                        "value-collection": "data",
                        "value-path": "slug",
                        "value-title": "name",
                        "parameters": {}
                    },
                    "x-ms-dynamic-list": {
                        "operationId": "ListWorkspaces",
                        "itemsPath": "data",
                        "itemValuePath": "slug",
                        "itemTitlePath": "name",
                        "parameters": {}
                    }
                },
                "effort": {
                    "description": "An effort tier of your account, such as low, medium or high. Leave empty for the default of the account.",
                    "pattern": "^[a-z0-9][a-z0-9_-]{0,39}$",
                    "type": "string",
                    "x-ms-summary": "Effort",
                    "x-ms-visibility": "advanced"
                },
                "hint": {
                    "description": "A note the agent of every step reads.",
                    "maxLength": 20000,
                    "type": "string",
                    "x-ms-summary": "Hint"
                },
                "sync_status": {
                    "description": "Whether the status of the ticket moves in its tracker as the run goes. The default of the playbook when empty.",
                    "type": "boolean",
                    "x-ms-summary": "Sync Status",
                    "x-ms-visibility": "advanced"
                },
                "validate": {
                    "description": "Whether the delivered work is checked once the run ends. The default of the account when empty.",
                    "type": "boolean",
                    "x-ms-summary": "Validate",
                    "x-ms-visibility": "advanced"
                }
            },
            "required": [
                "playbook"
            ],
            "additionalProperties": false
        },
        "OnJobFinishedRequest": {
            "type": "object",
            "properties": {
                "url": {
                    "type": "string",
                    "description": "The address the events are sent to.",
                    "x-ms-summary": "Callback URL",
                    "x-ms-notification-url": true,
                    "x-ms-visibility": "internal"
                },
                "events": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "default": [
                        "job.finished"
                    ],
                    "description": "The event this trigger listens to.",
                    "x-ms-summary": "Events",
                    "x-ms-visibility": "internal"
                },
                "workspace": {
                    "type": "string",
                    "description": "Only the jobs of this workspace. Leave empty for every workspace.",
                    "x-ms-summary": "Workspace",
                    "x-ms-dynamic-values": {
                        "operationId": "ListWorkspaces",
                        "value-collection": "data",
                        "value-path": "slug",
                        "value-title": "name",
                        "parameters": {}
                    },
                    "x-ms-dynamic-list": {
                        "operationId": "ListWorkspaces",
                        "itemsPath": "data",
                        "itemValuePath": "slug",
                        "itemTitlePath": "name",
                        "parameters": {}
                    }
                }
            },
            "required": [
                "url",
                "events"
            ],
            "additionalProperties": false
        },
        "OnJobFinishedEvent": {
            "type": "object",
            "properties": {
                "id": {
                    "description": "The ID of the delivery. A retry of it has the same ID.",
                    "type": "integer",
                    "minimum": 1,
                    "x-ms-summary": "Delivery ID"
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "job.finished"
                    ],
                    "x-ms-summary": "Event",
                    "description": "The event the delivery tells."
                },
                "api_version": {
                    "description": "The version of the payload, v1.",
                    "type": "string",
                    "enum": [
                        "v1"
                    ],
                    "x-ms-summary": "API Version"
                },
                "created_at": {
                    "description": "When the event happened.",
                    "type": "string",
                    "x-ms-summary": "Event At"
                },
                "webhook_id": {
                    "description": "The ID of the subscription of the trigger.",
                    "type": "integer",
                    "minimum": 1,
                    "x-ms-summary": "Subscription ID"
                },
                "data": {
                    "type": "object",
                    "x-ms-summary": "Data",
                    "description": "The job that finished.",
                    "properties": {
                        "job": {
                            "$ref": "#/definitions/Job"
                        }
                    },
                    "required": [
                        "job"
                    ]
                }
            },
            "required": [
                "id",
                "type",
                "api_version",
                "created_at",
                "webhook_id",
                "data"
            ]
        },
        "OnJobNeedsInputRequest": {
            "type": "object",
            "properties": {
                "url": {
                    "type": "string",
                    "description": "The address the events are sent to.",
                    "x-ms-summary": "Callback URL",
                    "x-ms-notification-url": true,
                    "x-ms-visibility": "internal"
                },
                "events": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "default": [
                        "job.needs_input"
                    ],
                    "description": "The event this trigger listens to.",
                    "x-ms-summary": "Events",
                    "x-ms-visibility": "internal"
                },
                "workspace": {
                    "type": "string",
                    "description": "Only the jobs of this workspace. Leave empty for every workspace.",
                    "x-ms-summary": "Workspace",
                    "x-ms-dynamic-values": {
                        "operationId": "ListWorkspaces",
                        "value-collection": "data",
                        "value-path": "slug",
                        "value-title": "name",
                        "parameters": {}
                    },
                    "x-ms-dynamic-list": {
                        "operationId": "ListWorkspaces",
                        "itemsPath": "data",
                        "itemValuePath": "slug",
                        "itemTitlePath": "name",
                        "parameters": {}
                    }
                }
            },
            "required": [
                "url",
                "events"
            ],
            "additionalProperties": false
        },
        "OnJobNeedsInputEvent": {
            "type": "object",
            "properties": {
                "id": {
                    "description": "The ID of the delivery. A retry of it has the same ID.",
                    "type": "integer",
                    "minimum": 1,
                    "x-ms-summary": "Delivery ID"
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "job.needs_input"
                    ],
                    "x-ms-summary": "Event",
                    "description": "The event the delivery tells."
                },
                "api_version": {
                    "description": "The version of the payload, v1.",
                    "type": "string",
                    "enum": [
                        "v1"
                    ],
                    "x-ms-summary": "API Version"
                },
                "created_at": {
                    "description": "When the event happened.",
                    "type": "string",
                    "x-ms-summary": "Event At"
                },
                "webhook_id": {
                    "description": "The ID of the subscription of the trigger.",
                    "type": "integer",
                    "minimum": 1,
                    "x-ms-summary": "Subscription ID"
                },
                "data": {
                    "type": "object",
                    "x-ms-summary": "Data",
                    "description": "The job that needs input.",
                    "properties": {
                        "job": {
                            "$ref": "#/definitions/Job"
                        }
                    },
                    "required": [
                        "job"
                    ]
                }
            },
            "required": [
                "id",
                "type",
                "api_version",
                "created_at",
                "webhook_id",
                "data"
            ]
        },
        "OnTaskDoneRequest": {
            "type": "object",
            "properties": {
                "url": {
                    "type": "string",
                    "description": "The address the events are sent to.",
                    "x-ms-summary": "Callback URL",
                    "x-ms-notification-url": true,
                    "x-ms-visibility": "internal"
                },
                "events": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "default": [
                        "task.done"
                    ],
                    "description": "The event this trigger listens to.",
                    "x-ms-summary": "Events",
                    "x-ms-visibility": "internal"
                },
                "workspace": {
                    "type": "string",
                    "description": "Only the tasks of this workspace. Leave empty for every workspace.",
                    "x-ms-summary": "Workspace",
                    "x-ms-dynamic-values": {
                        "operationId": "ListWorkspaces",
                        "value-collection": "data",
                        "value-path": "slug",
                        "value-title": "name",
                        "parameters": {}
                    },
                    "x-ms-dynamic-list": {
                        "operationId": "ListWorkspaces",
                        "itemsPath": "data",
                        "itemValuePath": "slug",
                        "itemTitlePath": "name",
                        "parameters": {}
                    }
                }
            },
            "required": [
                "url",
                "events"
            ],
            "additionalProperties": false
        },
        "OnTaskDoneEvent": {
            "type": "object",
            "properties": {
                "id": {
                    "description": "The ID of the delivery. A retry of it has the same ID.",
                    "type": "integer",
                    "minimum": 1,
                    "x-ms-summary": "Delivery ID"
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "task.done"
                    ],
                    "x-ms-summary": "Event",
                    "description": "The event the delivery tells."
                },
                "api_version": {
                    "description": "The version of the payload, v1.",
                    "type": "string",
                    "enum": [
                        "v1"
                    ],
                    "x-ms-summary": "API Version"
                },
                "created_at": {
                    "description": "When the event happened.",
                    "type": "string",
                    "x-ms-summary": "Event At"
                },
                "webhook_id": {
                    "description": "The ID of the subscription of the trigger.",
                    "type": "integer",
                    "minimum": 1,
                    "x-ms-summary": "Subscription ID"
                },
                "data": {
                    "type": "object",
                    "x-ms-summary": "Data",
                    "description": "The task that is done.",
                    "properties": {
                        "task": {
                            "$ref": "#/definitions/Task"
                        }
                    },
                    "required": [
                        "task"
                    ]
                }
            },
            "required": [
                "id",
                "type",
                "api_version",
                "created_at",
                "webhook_id",
                "data"
            ]
        }
    },
    "parameters": {},
    "responses": {},
    "securityDefinitions": {
        "api_key": {
            "type": "apiKey",
            "in": "header",
            "name": "Authorization"
        }
    },
    "security": [
        {
            "api_key": []
        }
    ],
    "tags": [],
    "x-ms-connector-metadata": [
        {
            "propertyName": "Website",
            "propertyValue": "https://kadmo.ai"
        },
        {
            "propertyName": "Privacy policy",
            "propertyValue": "https://kadmo.ai/privacy"
        },
        {
            "propertyName": "Categories",
            "propertyValue": "AI;Productivity"
        }
    ],
    "x-ms-capabilities": {
        "testConnection": {
            "operationId": "GetMe",
            "parameters": {}
        }
    }
}
